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: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] SQLRowCount failing after prepare and execute
  • Date: Tue, 17 Feb 2004 15:47:35 -0500

> From: Thompson, Bill D (London) [mailto:bill_d_thompson AT ml.com]
> Sent: February 17, 2004 8:11 AM
>
> 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. It
> might be worth
> trying out a simple statement with a trigger attached to the
> update in your
> MS ODBC driver to see how that behaves...bet I can guess...

I don't think it's valid to add the triggered updated rows:

1> select * from a select * from b
2> go
a
-----------
1
1
2
2

(4 rows affected)
b
-----------
1
2

(2 rows affected)
1> create trigger atrig on a for insert
as insert b select * from inserted
2> go
1> insert a values (3) select * from a select * from b
2> go
(1 row affected)
a
-----------
1
1
2
2
3

(5 rows affected)
b
-----------
1
2
3

(3 rows affected)

Note "1 row affected" on the insert. Anything else would be highly
misleading.

Feel free to ignore me if this isn't material to the question.

--jkl

-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.
If you, as an intended recipient of this commercial e-mail or advertisement,
would not like to receive further e-mail correspondence from the sender,
please "reply" to the sender indicating your wishes.
In the U.S.: 1345 Avenue of the Americas, New York, NY 10105








Archive powered by MHonArc 2.6.24.

Top of Page