DBD::Sybase and FreeTDS
Brian Bruns
camber at umcc.ais.org
Tue Dec 28 12:16:48 EST 1999
Hi, I'm unable to reproduce this. Can you run the following and tell me
if you get a null at the end? (change the connect string as appropriate)
Brian
--------
#!/usr/bin/perl
use DBI;
my $dbh = DBI->connect("dbi:Sybase:server=JDBC", "guest", "sybase",
{PrintError => 0});
my $q = "select \@\@servername";
my $sth = $dbh->prepare($q);
return undef unless $sth;
$sth->execute;
my $user;
my $server;
if ($server = $sth->fetchrow)
{
print "$server\n";
$sth->finish;
}
-----------
On Tue, 28 Dec 1999, Kevin Wormington wrote:
> I originally posted the following before Christmas and didn't get any
> responses, so I thought I would post again in case it wasn't seen.
>
> ----- Original Message -----
> Hi,
>
> I have been using a 0.47 snapshot with DBD::Sybase-0:20 and 0:21 with great
> success going against MS-SQL 7 servers. I use it for radiator radius and
> the only problem I have seen is a very slow memory leak, which is why I
> thought I would try a later 0.50 snapshot. The snapshot will compile fine
> but the following select returns some strange characters keeping radiator
> from operating correctly. Here is the perl snippet :
>
>
> my $q = "select id, username, password, active, timeleft, blockuser
> from customer where username='$name'";
>
> my $sth = $self->prepareAndExecute($q);
> return undef unless $sth;
>
> my $user;
> my ($cust_id, $username, $password, $active, $timeleft, $blockuser);
> if (($cust_id, $username, $password, $active, $timeleft, $blockuser) =
> $sth->fetchrow)
> {
> $self->log($main::LOG_INFO,"$cust_id, $password, $username, $timeleft,
> $blockuser");
> $sth->finish;
> }
>
>
> Here are the results of the above self->log printout:
>
> Thu Dec 23 17:48:03 1999: INFO: 1074, jaw^@, sdf^@, ,
>
>
> As you can see there are "^@" after some fields. Any help would be
> greatly appreciated. Also, I have tried it with tdsver=4.2 and 7.0 and with
> DBD::Sybase 0.20 and 0.21.
>
> Thanks,
>
> Kevin
> Sofnet, Inc.
>
>
>
> ---
> You are currently subscribed to freetds as: camber at ais.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>
More information about the FreeTDS
mailing list