moonoo
asked on
jdbc single quote problem ( how to escape)
Hi ,
I have a Store Precodure wich takes a varchar input parameters .
I am passing a String like '20' enquoted in the double quotes like this.
exec sp_GetSearchedDeals @Country = " '09' " .
This Statement works from the DB ( I am using Rapid SQL) . But in my java Program it gives a exception like this
ERROR:com.sybase.jdbc2.jdb c.SybSQLEx ception: Invalid column name ''09''.
I have to pass the single quotes in my String ( the varchar I am passing to the Store Procedure ) . How can i escape the single quotes inside the varchar data i am passing ?
Any help will be greatly appreciated..
Regards
Deb
I have a Store Precodure wich takes a varchar input parameters .
I am passing a String like '20' enquoted in the double quotes like this.
exec sp_GetSearchedDeals @Country = " '09' " .
This Statement works from the DB ( I am using Rapid SQL) . But in my java Program it gives a exception like this
ERROR:com.sybase.jdbc2.jdb
I have to pass the single quotes in my String ( the varchar I am passing to the Store Procedure ) . How can i escape the single quotes inside the varchar data i am passing ?
Any help will be greatly appreciated..
Regards
Deb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.