The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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

asked 29 May '13, 19:48

tt0686's gravatar image

tt0686
0222
accept rate: 0%

closed 29 May '13, 21:26

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262

1

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.

(29 May '13, 21:05) Graeme Perrow

The question has been closed for the following reason "Question is off-topic or not relevant" by Mark Culp 29 May '13, 21:26

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×100
×62
×47

question asked: 29 May '13, 19:48

question was seen: 599 times

last updated: 29 May '13, 21:26