error in syntax .check manual
518497Sep 10 2008 — edited Sep 10 2008Hi
I am getting on value of variable(sj) from database and storing in list and using that value to get ID from same table.
Now problem ---- if value of variable (psj = yyuyu "ghgh jkjkj" ghghg ) OR (psj=hjhjhj 'hjhjh jkjkj' hhjhjh).It gives error "you have error in syntax......." .(because of presence of sigle or double quote.how to correct this .I am newbie
i tried both but same result
a)String psj=(String)kjk.get(y);
resultsetnt=statement.executeQuery("select ID from tbl where Text='"+psj+"'");
b)String psj=(String)kjk.get(y);
resultsetnt=statement.executeQuery("select ID from tbl where Text=\""+psj+"\""); where id continas integer