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: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Prepared statement row count problem
  • Date: Thu, 6 Nov 2003 11:22:00 -0000

Hey freddy,

I'm back on the mailing list now :-)

As I mailed yesterday, I got the same failure on moreandcount BEFORE my
patch was applied.
Are you getting the same failure as me, and have you an old snapshot you can
verify the behaviour before my patch ?

Bill

> -----Original Message-----
> From: ZIGLIO Frediano [SMTP:Frediano.Ziglio AT vodafone.com]
> Sent: 06 November 2003 10:40
> To: FreeTDS Development Group
> Subject: RE: [freetds] Prepared statement row count problem
>
> >
> > 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
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page