开发者

"Invalid SQL statement or JDBC escape, terminating '}' not found." with jTDS and Sybase

I'm calling a stored procedure via ibatis. It works, and has worked, when using the jconn2.jar (5.5). When I swap it out for the jtds jar (1.开发者_JAVA百科2.5) I get an exception "Invalid SQL statement or JDBC escape, terminating '}' not found."

For more transparency I'm using Spring with DBCP. Obviously the parsing of the SQL code in jTDS is not being liked, that is being accepted in jconn2. This project predates a bunch of us, and I haven't used Sybase in years.

The outlying chars in the data are "-", ":" and "."

Do I need to escape my parameters in the stored procedure call statement to get around this issue? Are there default settings for jconn2 that are not set for jTDS?

Thanks.


The answer is jConnect loosely interprets the ordering of braces and parentheses.

So {call MyStoredProc(?,?,?}) is fine for jConnect. jTds has strict parsing, so the mis-matched brace and parenthesis is incorrect.

Not fun.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜