Skip to Content.
Sympa Menu

freetds - RE: [freetds] Prepared statement row count problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Prepared statement row count problem
  • Date: Thu, 6 Nov 2003 11:40:24 +0100

>
> Just to be clear - the row count for prepared selects is
> correct for me
> - its the row count of inserts/updates that have the problem.
>
> Alex Hornby wrote:
>
> >
> > Using FreeTDS with prepared statements seems to work well for me,
> > however the count of rows affected by an insert or update
> doesn't seem
> > to be populated. I always get -1 returned.
> >
> > Non-prepared statements return the correct count.
> >
> > I'm using the ODBC API - I'd be interested to know if the other APIs
> > have this problem.
> >
> > Cheers,
> > Alex.
> >

Can you send a test case ?

just
SQLPrepare("INSERT INTO table(column) VALUES(123)")
SQLExecute()
??

I think this is the correct behaviour (compatible with MS ODBC). The
reason is that some SP can return spurious DONEINPROC tokens (like
SELECT @i = 123) so it skip even your inserts. See moreandcount
unittest.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page