DataTable ¿ÀºêÁ§Æ®ÀÇ ROWÀÇ °¹¼ö¸¦ ±¸ÇÑ´Ù.
int @DataTableGetRowCount(object datatable);
ÇÔ¼öÀÎÀÚ
object datatable : DataTable ¿ÀºêÁ§Æ®
¹Ýȯ °ª
ROWÀÇ °¹¼ö¸¦ ¹ÝȯÇÑ´Ù.
¿¹Á¦
connection_id = @ProxyMongoOpen("mongodb://192.168.1.149", "test");
if(connection_id == 0)
{
@Message("Error. connection_id ==
0");
return;
}
string text;
@sprintf(text,
"{PersonCount:50}");
string sort;
@sprintf(sort, "{_id:1}");
object
dt;
dt = @ProxyMongoFill(connection_id, "things", text, sort);
@ProxyMongoClose(connection_id);
if(dt == null)
{
@MessageBox(@GetLastError(), "MongoFill Error", MB_OK);
return;
}
int count;
count = @DataTableGetRowCount(dt);
if(count >
0) {
string data = @DataTableGetRowData(dt, "PersonDate", 0);
string id = @DataTableGetRowData(dt, "_id", 0);
@sprintf(text,
"Count=%d _id=%s, PersonDate=%s", count, id, data);
@Message(text);
}
else {
@sprintf(text, "Count=%d",
count);
@Message(text);
}
@DataGridSetDataTable("DataGrid1", dt);
@DataGridReLoad("DataGrid1");
¹®Àå¼³¸í : 192.168.1.149 IPÀÇ test µ¥ÀÌÅͺ£À̽º¸¦ ¿¾î¼ »ç¿ëÇÏ´Â ¿¹Á¦
¹öÀüÁ¤º¸
ÃÖÃÊÁö¿ø: 10.3.5
°ü·ÃÇ׸ñ