1 /* create table 't1' with two fields f1 int, f2 int.
2 * use spaceused() to know the size of the table,
3 * here the table size will be 16 bytes.
5 * AUTHOR : Jitendra Lenka
12 DbRetVal rv
= conn
.open("root","manager");
14 DatabaseManager
*dbMgr
= conn
.getDatabaseManager();
17 printf("Auth failed\n");
22 tabDef
.addField("f1",typeInt
,0,NULL
,true);
23 tabDef
.addField("f2",typeInt
);
25 rv
= dbMgr
->createTable("t1",tabDef
);
28 printf("Table created failed\n");
34 Table
*table
= dbMgr
->openTable("t1");
36 spaceused
= table
->spaceUsed();
37 printf("Total space used=%ld\n",spaceused
);
39 dbMgr
->closeTable(table
);
40 dbMgr
->dropTable("t1");