freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] Prepared statement row count problem
- 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
-
[freetds] Prepared statement row count problem,
Alex Hornby, 11/05/2003
- Re: [freetds] Prepared statement row count problem, Alex Hornby, 11/05/2003
- <Possible follow-up(s)>
- RE: [freetds] Prepared statement row count problem, ZIGLIO Frediano, 11/06/2003
- RE: [freetds] Prepared statement row count problem, Thompson, Bill D (London), 11/06/2003
- RE: [freetds] Prepared statement row count problem, ZIGLIO Frediano, 11/06/2003
- RE: [freetds] Prepared statement row count problem, Thompson, Bill D (London), 11/06/2003
- RE: [freetds] Prepared statement row count problem, ZIGLIO Frediano, 11/07/2003
Archive powered by MHonArc 2.6.24.