[freetds] Affected Rows with FreeTDS and DBI
James K. Lowden
jklowden at schemamania.org
Tue Aug 5 01:39:24 EDT 2003
On Tue, 05 Aug 2003 12:42:18 +0900, Glen Malley <glen at gmo.jp> wrote:
>
> 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.
Glen,
Welcome to the project. I think this feature works or can be made to.
Could we see a TDSDUMP log of your "minimal" test? There should be
indications in there of a call to ct_res_info() with type CS_ROW_COUNT,
indicating rows affected. If the count is -1, it means we think the
server marked the "rows affected" field of the TDS_DONE_TOKEN packet as
invalid.
I assume you mean 0.61 of FreeTDS and 1.00 of DBD::Sybase.
--jkl
More information about the FreeTDS
mailing list