SqlNwConnection and statement can be created by SqlFactory class.
[csql.git] / test / sqlapi / Connect / common.h
blobdfcefe1b2a1a252cdd11a78332a9211b135b30cb
1 #include<SqlFactory.h>
2 #include<SqlNwConnection.h>
3 #include<SqlNwStatement.h>
5 AbsSqlConnection *createConnection()
7 #ifdef NET
8 AbsSqlConnection *con = SqlFactory::createConnection(CSqlNetwork, "localhost", 5678);
9 #else
10 AbsSqlConnection *con = SqlFactory::createConnection(CSql);
11 #endif
12 return con;
15 AbsSqlStatement *createStatement()
17 #ifdef NET
18 AbsSqlStatement *stmt = SqlFactory::createStatement(CSqlNetwork);
19 #else
20 AbsSqlStatement *stmt = SqlFactory::createStatement(CSql);
21 #endif
22 return stmt;