[Sqlrelay-discussion] sqlrelay 0.45 and mysql 5.1.62 C++ -- bind problem
Brought to you by:
mused
From: Vishal S. (GDC) <gdc...@gm...> - 2012-07-27 05:22:16
|
hello, I am new to sqlrelay and have the following query on using the bind variables of mysql using sqlrelay. the version of distributions i am using is mentioned in the subject I am using the C++ api of sqlrelay. I prepare a mysql statement as below (please not that I use `@' instead of `:' mentioned in the tutorial, as `:' was giving MySQL errors) cur->prepareQuery ("select * from testtable2 where id=@id1"); cur->inputBind("id1",1); cur->executeQuery (); While the above three statements don't generate any errors, I don't get the results. If I did cur->prepareQuery ("select * from testtable2 where id=:id1"); cur->inputBind("id1",1); cur->executeQuery (); MySQL generated errors as in Wrong Syntax. Anything that I would have missed? sqlrconnection, sqlrcursor are properly initialized and if I do: cur->prepareQuery ("select * from testtable2 where id=1"); cur->executeQuery (); i do get the results. SQLRelay Experts, please guide. Regards, BIC |