*** empty log message ***
[csql.git] / test / durability / redologs / stmtTest9.c
blob9070fa1afc59d9b82d1e9fbab263c6f6c0ac08a8
1 #include <SqlFactory.h>
3 int main(int argc, char **argv)
5 DbRetVal rv = OK;
6 struct timeval timeout;
7 struct timeval timeStamp;
8 AbsSqlConnection *con = SqlFactory::createConnection(CSql);
9 rv = con->connect("root","manager");
10 if(rv!=OK)return 1;
11 AbsSqlStatement *stmt = SqlFactory::createStatement(CSql);
12 stmt->setConnection(con);
13 char statement[200];
14 int rows =0;
16 // insert into table
17 strcpy(statement,"INSERT INTO t1 VALUES(1234,?);");
18 rv = stmt->prepare(statement);
19 if(rv!=OK) { delete stmt; delete con; return 4; }
20 int rnd = 0;
21 rv = con->beginTrans();
22 stmt->setIntParam(1, 100);
23 con->commit();
24 con->disconnect();
25 delete con;