Why can't this stored procedure be called? (Fre eTDS_JDBC and jtds)

"Schörk, Andreas" andreas.schoerk at infor.de
Mon Sep 10 07:03:16 EDT 2001


Anton
Sorry I do not have 6.5 available, I tried by 
setting the protocol to tds4.2 and tds7.0
in both environments it worked with a sql-server 7.0.
A blind suggestion:
in PreparedStatement_base.java
extend:
               else if (tmp.getPacketType()
                        == TdsDefinitions.TDS_RET_STAT_TOKEN)
               {
                  // nop
               }

to 
               else if (tmp.getPacketType()
                        == TdsDefinitions.TDS_RET_STAT_TOKEN
                        || 
                        tmp.getPacketType() == TdsDefinitions.TDS_PROCID)
               {
                  // nop
               }
the procid-packet seems to be ignored all the time it is sent.
perhaps this helps.
Tell me if it is working
Andreas


> -----Original Message-----
> From: Anton van Straaten [mailto:anton at appsolutions.com]
> Sent: Montag, 10. September 2001 12:39
> To: TDS Development Group
> Subject: [freetds] Re: Why can't this stored procedure be called? (Fre
> eTDS_JDBC and jtds)
> 
> 
> Andreas,
> 
> Thanks very much for the prompt assistance.
> 
> I tried your unit test against jtds-0.1.1.jar, and it failed 
> with the same
> error.  I then did a full checkout from CVS, built it, modified
> conf\connection.properties (my connection string is
> "url=jdbc:freetds:sqlserver://localhost/epas"), tested that 
> everything was
> working, and then ran "doTest freetds.AsTest".  This gave the 
> same error.
> Here's the tail end of the output:
> 
> BUILD SUCCESSFUL
> 
> Total time: 1 second
> .E
> Time: 0.89
> There was 1 error:
> 1) testProc1(freetds.AsTest)
> java.sql.SQLException: Protocol confusionFound a
> com.internetcds.jdbc.tds.PacketResult (packet type 0x7c)
>         at
> com.internetcds.jdbc.tds.PreparedStatement_base.executeCall(Pr
> eparedStatemen
> t_base.java:273)
>         at
> com.internetcds.jdbc.tds.PreparedStatement_base.execute(Prepar
> edStatement_ba
> se.java:184)
>         at
> com.internetcds.jdbc.tds.PreparedStatement_base.executeQuery(P
> reparedStateme
> nt_base.java:349)
>         at freetds.AsTest.testProc1(AsTest.java:61)
>         at freetds.AsTest.main(AsTest.java:43)
> 
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
> 
> 
> 
> I also verified that if I remove "insert #tmp" from the 
> string on line 58 of
> AsTest.java, the test succeeds.
> 
> Is this working for you with MS SQL 6.5?  Any other ideas?
> 
> Thanks,
> Anton
> 
> 
> > -----Original Message-----
> > From: bounce-freetds-132811 at franklin.oit.unc.edu
> > [mailto:bounce-freetds-132811 at franklin.oit.unc.edu]On 
> Behalf Of Schörk,
> > Andreas
> > Sent: Monday, September 10, 2001 4:16 AM
> > To: TDS Development Group
> > Subject: [freetds] Re: Why can't this stored procedure be 
> called? (Fre
> > eTDS_JDBC and jtds)
> >
> >
> > I created in the newest sourceforge-version a JUNIT-Test- 
> Called AsTest.
> > you can call it by:
> >
> > doTest freetds.AsTest
> >
> > I fear you have to access the CVS-Repository to do this.
> > There are problems at the moment with the mixing of
> > Resultset-producing and
> > not producing Batches. But they normally return at least 
> the Resultsets.
> >
> > Could you look at the code in AsTest.java and suggest the changes
> > that lead
> > to
> > your problem ?
> > Andreas
> >
> 
> 
> ---
> You are currently subscribed to freetds as: [andreas.schoerk at infor.de]
> To unsubscribe, forward this message to 
> $subst('Email.Unsub')
> 



More information about the FreeTDS mailing list