Skip to Content.
Sympa Menu

freetds - DBD::Sybase(ver .22)/FreeTDS(42)/Solaris(2.6)/MSSQL7 - Multiple Issues

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "sarva" <sarva AT siterock.com>
  • To: freetds
  • Subject: DBD::Sybase(ver .22)/FreeTDS(42)/Solaris(2.6)/MSSQL7 - Multiple Issues
  • Date: Fri, 23 Jun 2000 23:32:49


1)
If do a fetch without a while loop, the script blocks on finish call,

$dbh->do('use cws');
$cur=$dbh->prepare('select GETDATE()');
$cur->execute();
$cur->bind_columns(undef, \$date);
$cur->fetch();
$cur->finish();
print "Date - $date";

It never get pasts the finish call. If you change the fetch call to,
while($cur->fetch()) {}
it works. From the system calls it looks like it is blocking on a read call
on /dev/udp.

2) Also in case of errors, the scripts blocks,
$cur=$dbh->prepare('select GETDATE()');
$cur->execute();
$cur->bind_columns(undef, \$login, \$date);
$cur->fetch();
$cur->finish();
print "Date - $date";

Since I'm binding two columns when I selected only one, it writes the
error
"bind_columns called with 2 refs when 1 needed. at tds.pl"
to STDERR and blocks on bind_columns call.

If I add eval around the prepare, execute, fetch and bind_columns, it gets
to the error block and blocks on finish,
eval {
$cur=$dbh->prepare('select GETDATE()');
$cur->execute();
$cur->bind_columns(undef, \$login, \$date);
while($cur->fetch()){}
};
if($@) {
print "Error " . $dbh->errstr;
}
$cur->finish();
$cur->disconnect();

The $dbh->errstr variable is also empty. I also tried $DBI::errstr.

If i comment the $cur->finish() call, the script Seg faults after
disconnecting.


I'm really tired. Please help me.




Archive powered by MHonArc 2.6.24.

Top of Page