freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] SQLRowCount failing after prepare and execute
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] SQLRowCount failing after prepare and execute
- Date: Tue, 17 Feb 2004 17:24:25 +0100
...
> >
> > If we end up adding in rowcounts generated by triggered
> > updates/inserts/deletes - so what ? we would be returning a valid
> > total of the number of records affected by the original statement.
>
> For my purposes, I think this would work. For a general
> concept of "correctness" - from my perspective as a user -
> SQLRowCount() should give the same answer for the same
> command, regardless of whether it was prepared and executed,
> or just execdirected. In the case of triggered activity, does
> SQLRowCount() include rows affected by the triggers when you
> use SQLExecDirect()? I'll try to find a moment to test this
> under Windows later today.
>
> Big thanks to everyone who is looking into this for me!
>
Hi Matthew!
The problem is that results from triggers are exactly the same from your
update. Using SQLPrepare is like creating a store procedure and calling
this store procedure instead of executing directly. The wire change very
deeply. If you issue (with SQLPrepare) a "delete ... select ..." you get
(with FreeTDS or MS ODBC drivers) only a single recordset... the same
query with SQLExecDirect (but without parameters) return two recordset.
every delete/insert/update before any rows are just ignored. See
moreandcount test (not last commit); this test reflect exactly the
behaviour of MS and FreeTDS ODBC driver.
freddy77
-
RE: [freetds] SQLRowCount failing after prepare and execute
, (continued)
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Thompson, Bill D (London), 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Thompson, Bill D (London), 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Thompson, Bill D (London), 02/16/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/16/2004
-
RE: [freetds] SQLRowCount failing after prepare and execute,
Thompson, Bill D (London), 02/17/2004
- Re: [freetds] SQLRowCount failing after prepare and execute, Matthew A. Davis, 02/17/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/17/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, ZIGLIO, Frediano, VF-IT, 02/17/2004
- RE: [freetds] SQLRowCount failing after prepare and execute, Lowden, James K, 02/17/2004
Archive powered by MHonArc 2.6.24.