freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] rows method with SyBase driver always returns -1
- From: Alan Mosca <nitbix AT nitbix.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] rows method with SyBase driver always returns -1
- Date: Thu, 7 Mar 2013 17:35:41 +0000
Hello,
I am using the SyBase driver to connect to Sql Server 08 and after an
insert or an update the rows method always returns -1. I have attached a
TDSDUMP, and following is some sample code. Is this a bug or am I doing
something wrong?
Thank you!
--
Alan
#!/usr/bin/perl
my ($user, $pass, $server) = ('user', 'pass', 'server');
use DBI;
require DBD::Sybase;
# New TDS protocol
$ENV{TDSVER} = '8.0';
my $dbh = DBI->connect("dbi:Sybase:$server", $user, $pass,
{ RaiseError => 1,
PrintError => 0,
ShowErrorStatement => 1,
AutoCommit => 1,
FetchHashKeyName => 'NAME_lc',
syb_no_child_con => 1
})
or die "Could not make connection to database: $DBI::errstr";
###ON TEMP DATABASE
$dbh->do("create table #tbTemp (col1 int)");
$dbh->do("insert into #tbTemp values (1)");
#this prints -1
print $dbh->rows . "\n";
$dbh->do("update #tbTemp set col1 = 2 where col1 = 1");
#this prints -1
print $dbh->rows. "\n";
$dbh->do("drop table #tbTemp");
Attachment:
tds_dump.log
Description: Binary data
- [freetds] rows method with SyBase driver always returns -1, Alan Mosca, 03/07/2013
Archive powered by MHonArc 2.6.24.