MongoDB¸¦ CloseÇÑ´Ù.
MongoDB¸¦ »ç¿ëÇÏ·Á¸é ProxyMongoDB.exe ÇÁ·Î±×·¥ÀÌ ½ÇÇàµÇ¾î ÀÖ¾î¾ß ÇÑ´Ù. ( http://files.autobase.biz/FileDownLoad/FileDownLoad.aspx?Folder=Proxy )
int @ProxyMongoClose(int connection_id);
ÇÔ¼öÀÎÀÚ
int connection_id : Á¢¼ÓµÈ ¿¬°á ID
¹Ýȯ °ª
¼º°øÇϸé 1À» ¹ÝȯÇÏ°í ½ÇÆÐÇϸé 0À» ¹ÝȯÇÑ´Ù.
¿¹Á¦
connection_id = @ProxyMongoOpen("mongodb://192.168.1.149", "test");
if(connection_id == 0)
{
@Message("Error. connection_id ==
0");
return;
}
object t = @DateTimeNow();
int year
= @DateTimeYear(t);
int month = @DateTimeMonth(t);
int day =
@DateTimeDay(t);
int hour = @DateTimeHour(t);
int minute =
@DateTimeMinute(t);
int second = @DateTimeSecond(t);
int millisecond =
@DateTimeMillisecond(t);
string time_string;
@sprintf(time_string,
"%04d-%02d-%02dT%02d:%02d:%02d.%03dZ", year, month, day, hour, minute, second,
millisecond);
string text;
int count = 50;
@sprintf(text,
"{PersonDate:ISODate('%s'), PersonCount:%d, PersonText:'Text'}", time_string
,count);
int retn;
retn = @ProxyMongoInsert(connection_id, "things",
text);
@ProxyMongoClose(connection_id);
if(retn == 0){
@MessageBox(@GetLastError(), "MongoInsert Error", MB_OK);
return;
}
¹®Àå¼³¸í : 192.168.1.149 IPÀÇ test µ¥ÀÌÅͺ£À̽º¸¦ ¿¾î¼ »ç¿ëÇÏ´Â ¿¹Á¦
¹öÀüÁ¤º¸
ÃÖÃÊÁö¿ø: 10.3.5
°ü·ÃÇ׸ñ