1 //Create table with the field name made up of special characters other than
2 //underscore. it should not be allowed.
7 DbRetVal rv
= conn
.open("root", "manager");
8 if (rv
!= OK
) return 1;
9 DatabaseManager
*dbMgr
= conn
.getDatabaseManager();
10 if (dbMgr
== NULL
) { printf("Auth failed\n"); return 2;}
14 rv
=(DbRetVal
)tabDef
.addField("f-2", typeInt
);
16 rv
=(DbRetVal
)tabDef
.addField("2f", typeInt
);
18 rv
=(DbRetVal
)tabDef
.addField("f2@", typeInt
);
20 rv
=(DbRetVal
)tabDef
.addField("_f2#", typeInt
);
22 rv
=(DbRetVal
)tabDef
.addField("$f2", typeInt
);
24 rv
=(DbRetVal
)tabDef
.addField("$@*#", typeInt
);
28 if(i
){printf(" Test Failed \n"); return i
;}
30 rv
=dbMgr
->createTable("t1", tabDef
);
33 printf("Allowing fieldnames made up of all special characters\n");
34 printf("Test failed\n");
35 dbMgr
->dropTable("t1");
39 printf("Test Passed\n");
43 //Table is created and allowing field names with special characters other than underscores also