This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes jtds driver gives following error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "jtds driver gives following error" Watch "jtds driver gives following error" New topic

jtds driver gives following error

Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62
my database is sql server 7.0.
Driver used is jtds-0.9.jar from
iam executing a stored procedure.

in the log file, following message comes up
Invalid JDBC escape syntax at line position 33 '}' character expected

1>what does it mean and what must be done ?
2> is there any site where one can get list of all possible jdbc errors?


Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

jTDS 0.9 is a fairly stable release, so I'd say its unlikely (though by no means impossible) for this error to be the result of a bug in the Driver. I'd guess its more likely its the result of a syntax error in your Stored Procedure. Does you procedure acually run? Driver's typically only report the messages whichever database they are for throw. Check your issue on the DB first.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62

well i was calling a stored procedure like this, removing the blank spaces "{call my_sp(?)}".
Actually the procedure my_sp returns a resultset, which was not written while calling the my_sp procedure.
We were earlier using JSQLConnect driver on which the stored procedure "{call my_sp(?)}" used to run without any problem.
Now when moving to jTDS i faced the problem.

So i had to change the calling string to
"{? = call my_sp(?)}" and had to register an
outputparameter while working with jTDS 0.9.

jQuery in Action, 3rd edition
subject: jtds driver gives following error
It's not a secret anymore!