Good Night in my timezone. I am using Sybase ase 15 , and i have a store procedure with two input parameters both VARCHAR ,basically inside the store procedure i use dynamic SQL , something like this: @cmd = 'select * from TABLE where COL IN'+@PARAM1+'AND COL2=@PARAM2 EXEC(@cmd) I call this procedure using JDBC like this way: CallableStatement stmt = conn.prepareCall("{call MyStoreProcedure(?,?)}"); stmt.setString(1, "'''0'',''1'''"); stmt.setString(2, '''fr'''); stmt.executeQuery(); It throws me an error informing that the call is malformed. But if i run the call directly in the IDE like this : EXEC MyStoreProcedure'''0'',''1'',''2'',''3'',''4'',''5 '',''6'',''7''','''fr''' It runs without any problem, so i guess that there is some problem with the character escaping i guess. Anyone had experience this problem ? With the best regards Thanks in advance |
This site is specifically for questions about SAP Sybase SQL Anywhere. Questions about ASE should be asked on the SCN (SAP Community Network) over here.