2 //bind non exisiting field
6 DbRetVal rv
= conn
.open("root", "manager");
7 if (rv
!= OK
) return 1;
8 DatabaseManager
*dbMgr
= conn
.getDatabaseManager();
9 if (dbMgr
== NULL
) { printf("Auth failed\n"); return 2;}
12 tabDef
.addField("f1", typeInt
, 0, NULL
, true);
13 tabDef
.addField("f2", typeInt
);
14 tabDef
.addField("f3", typeString
, 20);
15 rv
= dbMgr
->createTable("t1", tabDef
);
16 if (rv
!= OK
) { printf("Table creation failed\n"); conn
.close(); return 3; }
17 printf("Table created\n");
19 Table
*table
= dbMgr
->openTable("t1");
22 printf("Unable to open table\n");
23 dbMgr
->dropTable("t1");
29 char name
[20] = "PRAVEEN";
30 rv
= table
->bindFld("f1", &id1
);
31 if (rv
!= OK
) ret
= 1;
32 rv
= table
->bindFld("f5", &id2
);
33 if (rv
== OK
) ret
= 1;
34 dbMgr
->closeTable(table
);
35 dbMgr
->dropTable("t1");