BioBytes Messages: 307 Registered: October 2008 Location: France
Senior Member
Hi all,
I have a question regarding the command sql.Execute. This is an example from my source code. the query works perfectly if the query is passed as below:
if(sql.Execute("select * from codetechnic where(codefamille='cat' and product='hemoglobin')")PromptOK("query is executed");
In case the query is built using parameters obtained from droplists controls as follows:
String query;
query<<"select * from codetechnic where(codefamille=";
query<<"'";
query<<mydroplist1.GetData().ToString();
query<<"'";
query<<" and product=";
query<<"'";
query<<mydroplist2.GetData().ToString();
query<<"'";
query<<")";
The expression if(sql.execute(query))returns false (????) and true as above.
Is anybody could explain to me how to pass runtime query ?