- 论坛徽章:
- 0
|
没有修改之前:
#!/usr/bin/perl
use DBI;
my $server = "sydb";
my $dbh = DBI->connect('dbi:Sybase:','dbuser','dbpass',{syb_dbd_server=>$server});
my $sth = $dbh->prepare("select * from zxq_test");
$sth->execute();
my @text;
while((@text) = $sth->fetchrow)
{
print $text[0]."\n";
}
修改后:
#!/usr/bin/perl
use DBI;
my $server = "sydb";
my $dbh = DBI->connect('dbi:Sybase:','dbuser','dbpass',{syb_dbd_server=>$server});
my $sth = $dbh->prepare("select convert(text,ccc) from zxq_test");
$sth->execute();
my @text;
while((@text) = $sth->fetchrow)
{
print $text[0]."\n";
}
修改后的可以把全部内容打印出来。超过255的字符都可以打印出来。 |
|