Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic