Skip to Content.
Sympa Menu

freetds - JDBC?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Greg <greg AT thecg.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: JDBC?
  • Date: Tue, 19 Jan 1999 20:56:42 -0600


I'm not sure if this list is also for the FreeTDS-JDBC, but....


Are there any known problems with PreparedStatements and the
SybaseDriver. I'm using the free version of Sybase ASE for Linux, which
is 11.0.3 I believe. Here's my code snippet and the SQLException I'm
getting:


PreparedStatement pstmt = conn.prepareStatement(
"update property set name = ?, value = ? where id = ?"
);
pstmt.setString(1, name);
pstmt.setString(2, value);
pstmt.setInt(3, id);
pstmt.execute();


That code gives me:

java.sql.SQLException: Must declare variable '@P1'.

at
com.internetcds.jdbc.tds.SqlMessage.toSQLException(SqlMessage.java:85)
at
com.internetcds.jdbc.tds.PreparedStatement.submitProcedure(PreparedStatement.java:303)

at
com.internetcds.jdbc.tds.PreparedStatement.execute(PreparedStatement.java:160)

at
com.internetcds.jdbc.tds.PreparedStatement.executeUpdate(PreparedStatement.java:342)

at ....


Any ideas?

Greg





  • JDBC?, Greg, 01/19/1999
    • <Possible follow-up(s)>
    • Re: JDBC?, Craig Spannring, 01/19/1999
    • Re: JDBC?, Greg, 01/20/1999

Archive powered by MHonArc 2.6.24.

Top of Page