Skip to Content.
Sympa Menu

freetds - Re: Prepared Statements within freeTDS..

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark O'Donohue" <mark.odonohue AT ludwig.edu.au>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: Prepared Statements within freeTDS..
  • Date: Thu, 9 Nov 2000 02:15:31 -0500


Ok Here was the problem from a packet subtype trace:

The first call to get stuff:

processSubPacket: -85 moreResults: true
processSubPacket: -3 moreResults: true
call #jdbc#3
processSubPacket: 124 moreResults: false
processSubPacket: -96 moreResults: false
processSubPacket: -95 moreResults: false
processSubPacket: -47 moreResults: false
processSubPacket: -1 moreResults: false
processSubPacket: -1 moreResults: false
processSubPacket: -1 moreResults: false
processSubPacket: -2 moreResults: false
0


The second call: (note no -85, -3 packets presumably associated with the
setup of the procedure.). Instead we get and extra 121, -2. packets, The
PreparedStatment.executeCall method blows up on them. But you can see the
normal data behind it.


call #jdbc#3
processSubPacket: 121 moreResults: true
processSubPacket: -2 moreResults: true

processSubPacket: 124 moreResults: false
processSubPacket: -96 moreResults: false
processSubPacket: -95 moreResults: false
processSubPacket: -47 moreResults: false
processSubPacket: -1 moreResults: false
processSubPacket: -1 moreResults: false
processSubPacket: -1 moreResults: false
processSubPacket: -2 moreResults: false


Patch to get me through, it sucks up the 121, and -2 packets. If someone
who knows what they are doing here can have a look I'd appreciate it.

PS: Ive sent this to the freetds-jdbc-bugs AT internetcds.com address as
well. Since Im new here and am not exactly sure where to send it.

Cheers

Mark



*** tmp/freetds_jdbc/PreparedStatement.java Sat Aug 28 14:40:55 1999
--- freetds_jdbc/PreparedStatement.java Thu Nov 9 18:00:11 2000
***************
*** 210,215 ****
--- 210,237 ----
}


+ // This patch gets me through calling a prepared statment twice in a row
+ // since there is an extra packet pair, 121, -2 that come back before
the
+ // second set of results.
+ // I suspect that since the first call created the procedure this second
+ // one gets some status info that is exists ok, However this patch
+ // is a hack, because basically I have no idea what it means.
+
+ if (tds.isRetStat()) {
+ while(tds.isRetStat())
+ {
+ tmp = tds.processSubPacket();
+ }
+
+ while(tds.isEndOfResults())
+ {
+ tmp = tds.processSubPacket();
+
+ }
+ }
+
+
+
while(tds.isDoneInProc())
{
tmp = tds.processSubPacket();




Archive powered by MHonArc 2.6.24.

Top of Page