Problem with OCCI bind variables
Trying to do a simple query involving a CHAR field with bind variable using OCCI with no success:
stmt = conn->createStatement ("SELECT state FROM city_tab WHERE city = :1"); -- with CITY declared as CHAR(15);
stmt->setString (1, 'SEATTLE');
ResultSet *rs = stmt->executeQuery(); -- yield no result
whereas from SQL tool,
SELECT state FROM city_tab WHERE city = 'SEATTLE';
will give the proper result:- 'WASHINGTON'.
Any idea?
0