1 #include <SqlStatement.h>
6 SqlConnection
*con
= new SqlConnection();
7 con
->connect("praba", "manager");
8 SqlStatement
*stmt
= new SqlStatement();
9 stmt
->setConnection(con
);
11 //strcpy(statement, "UPDATE t1 SET f2 = 299 WHERE f1 >97");
12 strcpy(statement
, "UPDATE t1 SET f1=? WHERE f2 > ?");
14 rv
= stmt
->prepare(statement
);
15 if (rv
!= OK
) {delete stmt
; delete con
; return 1; }
16 int id1
=160, id2
= 96;
17 stmt
->bindParam(1, &id1
);
18 stmt
->bindParam(2, &id2
);
28 printf("Update %d %lld %lld %lld\n", rows
, timer
.min(), timer
.max(), timer
.avg());