jdbc single quote problem ( how to escape)
Posted on 2004-11-09
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..