Ignacio El Kadre
2015-01-05 16:58:56 UTC
Hi everybody,
I'm not sure if I'm writing my query in the right place. Sorry if I'm not.
I'm checking the included tests, in particular test7:
statement st1 = (sql.prepare <<
"update soci_test set val = val + 1");
st1.execute(false);
assert(st1.get_affected_rows() == 10);
This pass the test. But the following lines doesn't:
int x = 0;
statement st1 = (sql.prepare <<
"update soci_test set val = val + :x", use(x));
x = 1;
st1.execute(false);
assert(st1.get_affected_rows() == 10);
Am I using the statement in the right way?
Best regards.
Ignacio
I'm not sure if I'm writing my query in the right place. Sorry if I'm not.
I'm checking the included tests, in particular test7:
statement st1 = (sql.prepare <<
"update soci_test set val = val + 1");
st1.execute(false);
assert(st1.get_affected_rows() == 10);
This pass the test. But the following lines doesn't:
int x = 0;
statement st1 = (sql.prepare <<
"update soci_test set val = val + :x", use(x));
x = 1;
st1.execute(false);
assert(st1.get_affected_rows() == 10);
Am I using the statement in the right way?
Best regards.
Ignacio