JDBC: Protocol confusion retrieving result of "SELECT @@IDENTITY"

Emmanuel Blot eblot at sablet.grenoble.hp.com
Wed Jul 12 06:13:32 EDT 2000


I get the same message while invoking a stored procedure:
  Protocol confusion- Was expecting a length of 17, got 5

with this call:

Statement st = m_connection.createStatement();

if ( st.execute(proc.toString()) )
  ResultSet rs = st.getResultSet();
  while( rs.next() )
     // ...

Where proc.toString() returns:
"exec sp_Engine_Order_Create 
'8435971295032424','SWDOc963330516781','2000-Jul-11 11:48:36'"

This problem occurs with the mid-may snapshot of FreeTDS JDBC (using the 
2.0 files) and also with the last available snapshot.

However, this problem occurs with MS SQL Server 7.00.839 (Driver

but the code works fine with MS SQL Server 7.00.623 (Driver !

Any idea ?

More information about the FreeTDS mailing list