Link to home
Start Free TrialLog in
Avatar of moonoo
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.jdbc.SybSQLException: 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
ASKER CERTIFIED SOLUTION
Avatar of Joe Woodhouse
Joe Woodhouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial