• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC Exception - Unexpected end of escape

 
Christopher Elkins
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm receiving the exception [Microsoft][SQLServer 2000 Driver for JDBC]Unexpected end of escape, line 0 offset 0.

I'm using a CallableStatement to call a Stored Procedure with four parameters; Integer, String, String, Integer. I've checked what is being passed to the Statement to fill the parameters and the data looks fine. I've looked high and low and I can't find any information on what the cause of this exception may be. Does anyone have any experience with it? Thanks.
 
Nathan Pryor
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error happened for me when I forgot to close a parentheses when creating
a CallableStatement:

CallableStatement sprocToRun = conn.prepareCall("{call msSproc(?,?}");

Notice the missing ')' after the parameters of the stored procedure.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!