freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Richard Rowell <richard AT bowmansystems.com>
- To: freetds AT franklin.oit.unc.edu
- Subject: freetds .53 & DBD-SYbase .93 Returns no rows
- Date: Tue, 8 Jan 2002 10:09:47 -0600
The server is s MS-SQL Server v7. I configured freetds to use TDS v7. When
I connect to a (MS)SQL 2000 server I get differnet results, it just sais that
the table dosen't exist (even though I'm positive that it does). This all
works fine from sqsh BTW.
This is the perl script I'm running, it is nearly a direct cut/paste from the
DBI tutorial on perl.com (I replaced the password with XXXXXXXX):
#!/usr/bin/perl -w
use DBI;
use strict;
DBI->trace(3);
my $dbh =
DBI->connect("DBI:Sybase:datbase=gths_dev;server=192.168.1.142","sa","XXXXXXXX")
or die "Couldn't connect to database server: " . DBI->errstr;
my $sth = $dbh->prepare('SELECT * FROM agency')
or die "Couldn't prepare statement: " . $dbh->errstr;
$sth->execute() # Execute the query
or die "Couldn't execute statement: " . $sth->errstr;
my @data;
while (@data = $sth->fetchrow_array())
{
my $firstname = $data[1];
my $id = $data[2];
print "\t$id: $firstname \n";
}
$sth->finish;
$dbh->disconnect;
The output from the trace is attached. To be honest I'm not sure what to
look for in the trace.
DBI 1.20-nothread dispatch trace level set to 3
-> DBI->connect(DBI:Sybase:datbase=gths_dev;server=192.168.1.142, sa,
****)
-> DBI->install_driver(Sybase) for linux perl=5.006001 pid=31834
ruid=1000 euid=1000
syb_init() -> DBD::Sybase 0.94 initialized
OpenClient version:
install_driver: DBD::Sybase version 0.94 loaded from
/usr/lib/perl/5.6.1/DBD/Sybase.pm
New DBI::dr (for DBD::Sybase::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x81b6a20)=>DBI::dr=HASH(0x82047b0),
DBD::Sybase::dr, 0, Null!)
dbih_make_com(Null!, DBD::Sybase::dr, 84)
<- install_driver= DBI::dr=HASH(0x81b6a20)
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x81b6a20)~0x82047b0
'datbase=gths_dev;server=192.168.1.142' 'sa' **** HASH(0x80f630c))
New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x82047b0), id=)
dbih_setup_handle(DBI::db=HASH(0x8202fc4)=>DBI::db=HASH(0x8200f20),
DBD::Sybase::db, 81b4978, Null!)
dbih_make_com(DBI::dr=HASH(0x82047b0), DBD::Sybase::db, 1960)
syb_db_login() -> checking for chained transactions
syb_db_login() -> chained transactions are supported
<- connect= DBI::db=HASH(0x8202fc4) at DBI.pm line 426
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8200f20)~INNER 'PrintError'
1)
STORE DBI::db=HASH(0x8200f20) 'PrintError' => 1
<- STORE= 1 at DBI.pm line 451
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8200f20)~INNER 'AutoCommit'
1)
<- STORE= 1 at DBI.pm line 451
<- connect= DBI::db=HASH(0x8202fc4)
-> prepare for DBD::Sybase::db (DBI::db=HASH(0x8202fc4)~0x8200f20 'SELECT
* FROM agency')
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x8200f20), id=)
dbih_setup_handle(DBI::st=HASH(0x8202fb8)=>DBI::st=HASH(0x80f6420),
DBD::Sybase::st, 8204774, Null!)
dbih_make_com(DBI::db=HASH(0x8200f20), DBD::Sybase::st, 396)
<- prepare= DBI::st=HASH(0x8202fb8) at import.pl line 7
-> execute for DBD::Sybase::st (DBI::st=HASH(0x8202fb8)~0x80f6420)
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4) == 1
ct_res_info() returns 78 columns
ct_describe(0): type = 2, maxlen = 4
describe() -> col 0, type 2, realtype 2
ct_describe(1): type = 1, maxlen = 50
describe() -> col 1, type 1, realtype 1
ct_describe(2): type = 1, maxlen = 50
describe() -> col 2, type 1, realtype 1
ct_describe(3): type = 1, maxlen = 100
describe() -> col 3, type 1, realtype 1
ct_describe(4): type = 1, maxlen = 50
describe() -> col 4, type 1, realtype 1
ct_describe(5): type = 1, maxlen = 50
describe() -> col 5, type 1, realtype 1
ct_describe(6): type = 1, maxlen = 50
describe() -> col 6, type 1, realtype 1
ct_describe(7): type = 2, maxlen = 4
describe() -> col 7, type 2, realtype 2
ct_describe(8): type = 1, maxlen = 50
describe() -> col 8, type 1, realtype 1
ct_describe(9): type = 1, maxlen = 50
describe() -> col 9, type 1, realtype 1
ct_describe(10): type = 1, maxlen = 50
describe() -> col 10, type 1, realtype 1
ct_describe(11): type = 1, maxlen = 50
describe() -> col 11, type 1, realtype 1
ct_describe(12): type = 2, maxlen = 4
describe() -> col 12, type 2, realtype 2
ct_describe(13): type = 1, maxlen = 50
describe() -> col 13, type 1, realtype 1
ct_describe(14): type = 1, maxlen = 50
describe() -> col 14, type 1, realtype 1
ct_describe(15): type = 1, maxlen = 50
describe() -> col 15, type 1, realtype 1
ct_describe(16): type = 1, maxlen = 50
describe() -> col 16, type 1, realtype 1
ct_describe(17): type = 1, maxlen = 50
describe() -> col 17, type 1, realtype 1
ct_describe(18): type = 1, maxlen = 50
describe() -> col 18, type 1, realtype 1
ct_describe(19): type = 1, maxlen = 50
describe() -> col 19, type 1, realtype 1
ct_describe(20): type = 1, maxlen = 50
describe() -> col 20, type 1, realtype 1
ct_describe(21): type = 1, maxlen = 50
describe() -> col 21, type 1, realtype 1
ct_describe(22): type = 1, maxlen = 50
describe() -> col 22, type 1, realtype 1
ct_describe(23): type = 1, maxlen = 50
describe() -> col 23, type 1, realtype 1
ct_describe(24): type = 1, maxlen = 50
describe() -> col 24, type 1, realtype 1
ct_describe(25): type = 16, maxlen = 4096
describe() -> col 25, type 16, realtype 16
ct_describe(26): type = 1, maxlen = 10
describe() -> col 26, type 1, realtype 1
ct_describe(27): type = 1, maxlen = 10
describe() -> col 27, type 1, realtype 1
ct_describe(28): type = 1, maxlen = 10
describe() -> col 28, type 1, realtype 1
ct_describe(29): type = 1, maxlen = 10
describe() -> col 29, type 1, realtype 1
ct_describe(30): type = 1, maxlen = 10
describe() -> col 30, type 1, realtype 1
ct_describe(31): type = 1, maxlen = 10
describe() -> col 31, type 1, realtype 1
ct_describe(32): type = 1, maxlen = 10
describe() -> col 32, type 1, realtype 1
ct_describe(33): type = 1, maxlen = 10
describe() -> col 33, type 1, realtype 1
ct_describe(34): type = 1, maxlen = 10
describe() -> col 34, type 1, realtype 1
ct_describe(35): type = 1, maxlen = 10
describe() -> col 35, type 1, realtype 1
ct_describe(36): type = 1, maxlen = 10
describe() -> col 36, type 1, realtype 1
ct_describe(37): type = 1, maxlen = 10
describe() -> col 37, type 1, realtype 1
ct_describe(38): type = 1, maxlen = 10
describe() -> col 38, type 1, realtype 1
ct_describe(39): type = 1, maxlen = 10
describe() -> col 39, type 1, realtype 1
ct_describe(40): type = 1, maxlen = 1
describe() -> col 40, type 1, realtype 1
ct_describe(41): type = 1, maxlen = 1
describe() -> col 41, type 1, realtype 1
ct_describe(42): type = 1, maxlen = 1
describe() -> col 42, type 1, realtype 1
ct_describe(43): type = 1, maxlen = 1
describe() -> col 43, type 1, realtype 1
ct_describe(44): type = 1, maxlen = 1
describe() -> col 44, type 1, realtype 1
ct_describe(45): type = 1, maxlen = 1
describe() -> col 45, type 1, realtype 1
ct_describe(46): type = 1, maxlen = 1
describe() -> col 46, type 1, realtype 1
ct_describe(47): type = 1, maxlen = 50
describe() -> col 47, type 1, realtype 1
ct_describe(48): type = 1, maxlen = 50
describe() -> col 48, type 1, realtype 1
ct_describe(49): type = 1, maxlen = 70
describe() -> col 49, type 1, realtype 1
ct_describe(50): type = 1, maxlen = 50
describe() -> col 50, type 1, realtype 1
ct_describe(51): type = 1, maxlen = 50
describe() -> col 51, type 1, realtype 1
ct_describe(52): type = 1, maxlen = 70
describe() -> col 52, type 1, realtype 1
ct_describe(53): type = 1, maxlen = 50
describe() -> col 53, type 1, realtype 1
ct_describe(54): type = 1, maxlen = 50
describe() -> col 54, type 1, realtype 1
ct_describe(55): type = 1, maxlen = 70
describe() -> col 55, type 1, realtype 1
ct_describe(56): type = 1, maxlen = 50
describe() -> col 56, type 1, realtype 1
ct_describe(57): type = 1, maxlen = 50
describe() -> col 57, type 1, realtype 1
ct_describe(58): type = 1, maxlen = 70
describe() -> col 58, type 1, realtype 1
ct_describe(59): type = 1, maxlen = 50
describe() -> col 59, type 1, realtype 1
ct_describe(60): type = 1, maxlen = 50
describe() -> col 60, type 1, realtype 1
ct_describe(61): type = 1, maxlen = 70
describe() -> col 61, type 1, realtype 1
ct_describe(62): type = 1, maxlen = 50
describe() -> col 62, type 1, realtype 1
ct_describe(63): type = 6, maxlen = 8
describe() -> col 63, type 1, realtype 6
ct_describe(64): type = 6, maxlen = 8
describe() -> col 64, type 1, realtype 6
ct_describe(65): type = 16, maxlen = 4096
describe() -> col 65, type 16, realtype 16
ct_describe(66): type = 16, maxlen = 4096
describe() -> col 66, type 16, realtype 16
ct_describe(67): type = 16, maxlen = 4096
describe() -> col 67, type 16, realtype 16
ct_describe(68): type = 16, maxlen = 4096
describe() -> col 68, type 16, realtype 16
ct_describe(69): type = 16, maxlen = 4096
describe() -> col 69, type 16, realtype 16
ct_describe(70): type = 16, maxlen = 4096
describe() -> col 70, type 16, realtype 16
ct_describe(71): type = 16, maxlen = 4096
describe() -> col 71, type 16, realtype 16
ct_describe(72): type = 16, maxlen = 4096
describe() -> col 72, type 16, realtype 16
ct_describe(73): type = 16, maxlen = 4096
describe() -> col 73, type 16, realtype 16
ct_describe(74): type = 16, maxlen = 4096
describe() -> col 74, type 16, realtype 16
ct_describe(75): type = 16, maxlen = 4096
describe() -> col 75, type 16, realtype 16
ct_describe(76): type = 1, maxlen = 1
describe() -> col 76, type 1, realtype 1
ct_describe(77): type = 1, maxlen = 1
describe() -> col 77, type 1, realtype 1
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
<- execute= -1 at import.pl line 9
-> fetchrow_array for DBD::Sybase::st (DBI::st=HASH(0x8202fb8)~0x80f6420)
dbih_setup_fbav for 78 fields => 0x80f630c
ct_results() final retcode = 15
st_next_result() -> lasterr = 0, lastsev = 0
syb_st_fetch() -> st_next_results() == 14
syb_st_fetch() -> resetting ACTIVE, moreResults, dyn_execed
<- fetchrow_array= ( ) [0 items] row1 at import.pl line 12
-> rows for DBD::Sybase::st (DBI::st=HASH(0x8202fb8)~0x80f6420)
<- rows= -1 at import.pl line 20
-> finish for DBD::Sybase::st (DBI::st=HASH(0x8202fb8)~0x80f6420)
<- finish= 1 at import.pl line 24
-> disconnect for DBD::Sybase::db (DBI::db=HASH(0x8202fc4)~0x8200f20)
syb_db_disconnect() -> ct_close()
<- disconnect= 1 at import.pl line 25
<> DESTROY ignored for outer handle DBI::st=HASH(0x8202fb8) (inner
DBI::st=HASH(0x80f6420))
-> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x80f6420)~INNER)
syb_st_destroy: called on 82060a0...
syb_st_destroy(): freeing imp_sth->statement
syb_st_destroy(): cmd dropped: 1
<- DESTROY= undef
<> DESTROY ignored for outer handle DBI::db=HASH(0x8202fc4) (inner
DBI::db=HASH(0x8200f20))
-> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x8200f20)~INNER)
<- DESTROY= undef
-- DBI::END
-> disconnect_all for DBD::Sybase::dr (DBI::dr=HASH(0x81b6a20)~0x82047b0)
<- disconnect_all= 1 at DBI.pm line 468
-> DESTROY in DBD::_::common for DBD::Sybase::dr
(DBI::dr=HASH(0x82047b0)~INNER)
<- DESTROY= undef during global destruction
<> DESTROY for DBI::dr=HASH(0x81b6a20) ignored (inner handle gone)
-
freetds .53 & DBD-SYbase .93 Returns no rows,
Richard Rowell, 01/08/2002
- <Possible follow-up(s)>
- Re: freetds .53 & DBD-SYbase .93 Returns no rows, Michael Peppler, 01/08/2002
- Re: freetds .53 & DBD-SYbase .93 Returns no rows, Richard Rowell, 01/08/2002
- Re: freetds .53 & DBD-SYbase .93 Returns no rows, Michael Peppler, 01/08/2002
Archive powered by MHonArc 2.6.24.