Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQLRowCount failing after prepare and execute

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQLRowCount failing after prepare and execute
  • Date: 14 Feb 2004 20:48:28 +0100

Il sab, 2004-02-14 alle 14:26, Frediano Ziglio ha scritto:
> Il sab, 2004-02-14 alle 14:11, Thompbil18 AT aol.com ha scritto:
> > Hey Freddy,
> >
> > Correct me if I'm wrong - is this discussion the same as the one we had a
> > while ago about the ODBC test program "moreandcount" after my ct-lib
> > patch ?
> >
> > Bill
> >
>
> It's related. ODBC seems to discard insert/delete/update inside
> procedure (or inside prepared statement, for implementation details it's
> the same). However there are other raised problems:
> - does ODBC cache row counts and return last valid one (so even last
> statement in prepared/store procedure are returned) ?
> - when should SQLRowCount return error 24000 (Invalid cursor state) ?
> I have to do some tests (and update moreandcount test too)
>
> freddy77
>

I did some strange and it's more complicated than I though...

Assuming you create a table with this code

create table #tmp (i int)
insert into #tmp values(1)

Issuing this query (using SQLPrepare)

select * from #tmp where i=2 delete from #tmp

return 1 columns and 1 row !!!
Simply 1 column from select and 1 row from delete.
I updated moreandcount test to catch this case (I'll fix ASAP)

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page