DBD::Sybase doesn't return number of rows affected
Srdan Dukic <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I've got a simple perl program which works with a MSSQL database and I am
using the DBD::Sybase module with the FreeTDS driver to access the database.
However, I find that the following code doesn't return the number of rows
affected correctly:
...
$insert = "Lorem Ipsum";
$query = "INSERT INTO Simple.dbo.test (text) VALUES('$insert')";
$sth = $dbh->prepare ($query) or die 'prepare failed\n';
$sth->execute() or die "unable to execute query $query error $DBI::errstr";
$rows = $sth->rows ;
print "$rows rows returned by query\n";
.....
But actually produces this output:
-1 rows returned by query
This is strange because I can see in the database that the row is definitely
inserted.
If this is a bug, should I report it under FreeTDS or DBD::Sybase?
Thank you
--
Srđan Đukić
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds