#!/usr/local/bin/perl -w use DBI; use strict; $ENV{'SYBASE'} = '/usr/local/freetds'; $ENV{'TDSVER'} = 70; my $server = "gene"; my $db = "ragedb"; my $user = "sqluser"; my $passwd = "sqluser"; my $dbh = DBI->connect("dbi:Sybase:server=$server;database=$db",$user,$passwd) or die "--$!--\n"; $dbh->{LongReadLen}=25000; #bytes, fails even if I set this to 1000. $dbh->{LongTruncOk}=1; my $sth = $dbh->prepare(" select * from sctemp "); $sth->execute; while(my $data = $sth->fetch) { print "@$data\n"; }