1
[csql.git] / test / dbapi / TableDef / tablename1.c
blobe2f9572b289a1379bb593398a980b46af8202cc8
1 //create table with the name made up of special characters other than underscores.It should fail
2 #include<CSql.h>
3 int main()
5 Connection conn;
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;}
11 TableDef tabDef;
13 tabDef.addField("f_1", typeInt, 0, NULL, true);
14 rv=dbMgr->createTable("t-1",tabDef);
15 if(rv==OK)
17 printf("Test Failed\n");
18 rv=dbMgr->dropTable("t-1");
19 return 3;
21 printf("Test Passed\n");
22 conn.close();
23 return 0;
26 //Table creating with name made up of any special character