Skip to Content.
Sympa Menu

freetds - [freetds] Affected Rows with FreeTDS and DBI

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Glen Malley <glen AT gmo.jp>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Affected Rows with FreeTDS and DBI
  • Date: Tue, 05 Aug 2003 12:42:18 +0900


Hello all, my apologies if my question has been handled before.
I've searched the archives and come across some similar issues,
but the responses given did not really apply to my situation.

I'm using the latest versions of FreeTDS, Perl, DBI, etc. to
communicate with MSSQL 7 servers.
My issue is this, after "execute"-ing an UPDATE in a manner to which
I know there will be a non-zero number of rows affected, I am
checking $sth->rows and the $result of the execution, and finding
them to be 0 and 0E0 respectively. I've used trace and not seen
the affected rows value being tossed about anywhere at all, so I can
only assume it's simply nowhere to be found.
I tested this with extremely minimal code, merely doing an update to
all entries in a test table, so I know there should always be affected
rows.

When using the exact same code with the old Sybase ctlib drivers,
I receive the correct number of affected rows. I have a considerable
amount of code which unfortunately is relying on that behaviour, but
which must be moved to a machine using FreeTDS. So I am wondering if
anyone can explain this behaviour, and/or recommend a course of action
I could take to fix it.

Thank you for your time.






Archive powered by MHonArc 2.6.24.

Top of Page