Skip to Content.
Sympa Menu

freetds - JDBC - "protocol confusion" 0x7c with particular stored procedure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Anton van Straaten" <anton AT appsolutions.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: JDBC - "protocol confusion" 0x7c with particular stored procedure
  • Date: Tue, 7 Aug 2001 02:15:19 -0400


I'm using freetds_jdbc_snapshot_2.0.jar with JDK 1.3.1 and MS SQL 6.5 with
SP5a. The SQL Server is running on an NT 4 box with SP 6a.

All my data access with the FreeTDS JDBC driver has been working just great
until now. I'm having some trouble invoking a specific stored procedure.
Using a test case based on the original code, I've narrowed the error down
to the following line in the stored procedure:

insert #DPCompanies execute spDistribPeriodCompanies @@SPID

If I comment out this line and replace it with some hardcoded
INSERT...VALUES statements to provide some dummy data, no errors occur.
However, if the above line is included in the stored procedure, the
following error is returned by the Java client:

Exception in thread "main" java.sql.SQLException: Protocol confusionFound a
com.internetcds.jdbc.tds.PacketResult (packet type 0x7c)
at
com.internetcds.jdbc.tds.PreparedStatement_base.executeCall(PreparedStatemen
t_base.java:251)
at
com.internetcds.jdbc.tds.CallableStatement_base.execute(CallableStatement_ba
se.java:394)
at TestJDBC.testCall(TestJDBC.java:30)
...

This error occurs in the following code:

CallableStatement stmt = conn.prepareCall("spTestProcReqs(?)");
stmt.setInt(1, 48);
stmt.execute(); <-- error occurs here

The error occurs on NT 4 clients as well as Red Hat Linux 7.0 clients.

I haven't yet tried to narrow down exactly what it is about the
INSERT...EXECUTE statement that causes the problem, other than the statement
itself. For example, I haven't yet tried to strip down or change the
procedure being called by INSERT...EXECUTE.

This procedure works fine when called via an ODBC driver. I'd appreciate it
greatly if anyone could shed any light on what might be happening - even if
it doesn't solve the problem, it would help me to have some idea of what
kind of limitation I'm running into here.

TIA,

Anton




  • JDBC - "protocol confusion" 0x7c with particular stored procedure, Anton van Straaten, 08/07/2001

Archive powered by MHonArc 2.6.24.

Top of Page