Skip to Content.
Sympa Menu

freetds - Re: JDBC: Protocol confusion retrieving result of " SELECT @@IDENTITY"

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Maraya Michael <maraya-michael AT dol.gov>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: JDBC: Protocol confusion retrieving result of " SELECT @@IDENTITY"
  • Date: Wed, 12 Jul 2000 11:16:18 -0400

Title: RE: [freetds] Re: JDBC: Protocol confusion retrieving result of " SELECT @@IDENTITY"

        I believe it's "select convert(decimal(17), @@identity)".  Use this instead of "select @@identity".  That should keep the JDBC driver happy until it gets patched.

----------
From:   Emmanuel Blot[SMTP:eblot AT jijia12.grenoble.hp.com]
Sent:   Wednesday, July 12, 2000 11:09 AM
To:     TDS Development Group
Subject:        [freetds] Re: JDBC: Protocol confusion retrieving result of "   SELECT @@IDENTITY"

Sorry, I am a beginner in both SQL and JDBC.

How should I write this cast (and where) ?

Thanks,
Emmanuel.

----- Original Message -----
From: "Maraya Michael" <maraya-michael AT dol.gov>
To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
Sent: Wednesday, July 12, 2000 4:04 PM
Subject: [freetds] Re: JDBC: Protocol confusion retrieving result of " SELECT @@IDENTITY"


> In the meanwhile, a work-around for this is to explicitly cast it as DECIMAL
> 17.
>
> > ----------
> > From: Bob Kline[SMTP:bkline AT rksystems.com]
> > Sent: Wednesday, July 12, 2000 9:38 AM
> > To: TDS Development Group
> > Subject: [freetds] Re: JDBC: Protocol confusion retrieving result of
> > "SELECT @@IDENTITY"
> >
> > On Wed, 12 Jul 2000, Emmanuel Blot wrote:
> >
> > > Hello.
> > >
> > > I get the same message while invoking a stored procedure:
> > > java.sql.SQLException:
> > >   Protocol confusion- Was expecting a length of 17, got 5
> > >   at
> > > com.internetcds.jdbc.tds.ResultSet_base.next(ResultSet_base.java:1542)
> > > but the code works fine with MS SQL Server 7.00.623 (Driver 3.70.06.90)
> > !
> > >
> > > Any idea ?
> > >
> >
> > This problem is fixed by the latest patches which Craig is in the
> > process of merging into the repository.
> >
> > --
> > Bob Kline
> > mailto:bkline AT rksystems.com
> > http://www.rksystems.com
> >
> >
> > ---
> > You are currently subscribed to freetds as: maraya-michael AT dol.gov
> > To unsubscribe, forward this message to
> > $subst('Email.Unsub')
> >
>


---
You are currently subscribed to freetds as: maraya-michael AT dol.gov
To unsubscribe, forward this message to $subst('Email.Unsub')



  • Re: JDBC: Protocol confusion retrieving result of " SELECT @@IDENTITY", Maraya Michael, 07/12/2000

Archive powered by MHonArc 2.6.24.

Top of Page