The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Java error with Sybase

Posted by Extempore on August 28, 2001 at 3:38 PM

getting this error when trying to send 3 arguments while calling the procedure in sybase -com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near '@p0'

getting this while removing the arguments and sending nothing...the sybase procedure has the hard coded arguements now - com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near ')'.

Here is the code:

CallableStatement sp = connection.prepareCall("{ CALL p_vos_ repair_followup() }");

sp.execute();

throws
com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near ')'

*****************************************************
CallableStatement sp = connection.prepareCall("{ CALL p_vos_ repair_followup(?,?,?) }");

sp.setString(1, "EU-R223");
sp.setString(2, "EU-223");
sp.setString(3, "EU");

sp.execute();


throws

com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near '@p0'


either way i get the error.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us