Skip to Content.
Sympa Menu

freetds - Re: [freetds] MS SQL Server 2005 and FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] MS SQL Server 2005 and FreeTDS
  • Date: Tue, 14 Feb 2006 16:36:41 +0100

> >Il giorno ven, 10/02/2006 alle 18.01 -0700, Jeff Dahl ha scritto:
> >
> >
> >>Why does this query
> >>
> >> CREATE TABLE #data( myID varchar( 25 ))
> >> INSERT into #data select myID from myTable where myID = 'data1'
> >> INSERT into #data select myID from myTable where myID = 'data2'
> >> CREATE index myindex on #data (myID)
> >> SELECT myID
> >> FROM #data, myTable
> >> WHERE ( #data.myID = myTable.myID )
> >> DROP TABLE #data
> >>
> >>generate this error:
> >>
> >> SQL_STATE: 24000
> >> NATIVE_ERROR: 0
> >> MSG: [FreeTDS][SQL Server]Invalid cursor state
> >> MSG_LEN: 41
> >>
> >>I've tried this with both 0.63 and the latest CVS version.
> Only the CVS
> >>version gives the error. Version 0.63 doesn't return anything.
> >>
> >>Thanks,
> >>Jeff Dahl
> >>
> >>
> >>
> >
> >Is difficult do reply to your question without knowing the
> tool you are
> >using... I suppose is a ODBC tool like isql. Or is it a program you
> >wrote?
> >
> I wrote the program using the ODBC API. However, if I run the same
> query with with tsql (v0.63 and CVS), the data is returned
> correctly.
> Looks like the problem is in the ODBC layer.
>
> >Does myTable contain 'data1' and 'data2' ?
> >
> >
> Yes.
>

Mmm... did you use SQLExecDirect and then SQLFetch return this "24000"
error ?
Which is the call sequence?

fredy77




Archive powered by MHonArc 2.6.24.

Top of Page