Skip to Content.
Sympa Menu

freetds - Re: 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: Re: DBD::Sybase(ver .22)/FreeTDS(42)/Solaris(2.6)/MSSQL7 - Multiple Issues
  • Date: Tue, 27 Jun 2000 0:11:52


Is anyone using the same configuration as I am?. Please atleast comment on
the problem I'm having.

Thanks.

Previous message,

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.





Archive powered by MHonArc 2.6.24.

Top of Page