freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Peter Haworth <pmh AT edison.ioppublishing.com>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: compile DBD-ODBC with freetds
- Date: Wed, 17 Mar 1999 10:47:07 +0000 (GMT)
Craig Spannring wrote:
> Peter Haworth writes:
> > Speaking of DBI, has anyone managed to get DBD::Sybase (using FreeTDS)
> > or DBD::FreeTDS on Solaris to talk to MS SQL on NT? I've hacked the
> > build as mentioned previously on the list to build big-endian, and with I
> > DBD::Sybase I can successfully connect to the server, but it always
> > complains that any rows returned have zero columns, and DBD::FreeTDS
> > always dumps core when trying to connect.
>
>
> Sorry, but yes, DBD::FreeTDS doesn't seem to handle SPARC. I think it
> is a word alignment issue, but I haven't seen a Solaris box in a few
> years. Could you send me the stack trace from the debugger?
Here's my simple DBD::FreeTDS attempt:
use DBI;
use blib;
use strict;
my $dbh=DBI->connect(
'dbi:FreeTDS:database=imis;host=194.200.94.235;port=1433',
'xxxxxx','yyyyyy'
) or die;
and here's the stack trace:
#0 0xef524b8c in AllocMemory_real (ptr=0xb4864, size=6,
filename=0xef52cce8 "dbdimp.c", lineno=376) at tdslayer.c:253
Source file is more recent than executable.
253 memtrailer(*ptr, false)->fence1 = fence1;
(gdb) bt
#0 0xef524b8c in AllocMemory_real (ptr=0xb4864, size=6,
filename=0xef52cce8 "dbdimp.c", lineno=376) at tdslayer.c:253
#1 0xef5213fc in tds_db_STORE_attrib (dbh=0x1c8ce0, imp_dbh=0xb4808,
keysv=0xb8c50, valuesv=0x1ae768) at dbdimp.c:376
#2 0xef51d534 in XS_DBD__FreeTDS__db_STORE (cv=0x1c89dc) at FreeTDS.xsi:119
#3 0xef55857c in XS_DBI_dispatch ()
#4 0x5ae7c in Perl_pp_entersub ()
#5 0x55c00 in Perl_runops ()
#6 0x2089c in perl_call_sv ()
#7 0xef558620 in XS_DBI_dispatch ()
#8 0x5ae7c in Perl_pp_entersub ()
#9 0x55c00 in Perl_runops ()
#10 0x1ffa8 in perl_run ()
#11 0x1dd28 in main ()
Using DBD::Sybase, I can connect, but the number of columns doesn't appear to
be set. I don't know whether this is the fault of FreeTDS or DBD::Sybase.
#!/opt/bin/perl
use DBI;
use strict;
my $dbh=DBI->connect('dbi:Sybase:server=imis','xxxxx','yyyyyy',{
RaiseError => 1, PrintError => 1,
}) or die;
my $sth=$dbh->prepare('SELECT member_type from member_types')
or die;
my $cols=$sth->{NUM_OF_FIELDS};
print "Prepare: $cols columns\n";
$sth->execute
or die;
$cols=$sth->{NUM_OF_FIELDS};
print "Execute: $cols columns\n";
while(my @row=$sth->fetchrow_array){
print "@row\n";
}
print "finishing\n";
$sth->finish
or die;
$dbh->disconnect
or die;
print "Done\n";
Output:
cs_dt_info() failed at /opt/site_perl/DBD/Sybase.pm line 68.
Unknown property 40
Unknown property 76
Unknown property 32
Msg 5701, Level 0, State 2, Server IMIS, Line 0
Changed database context to 'master'.
Prepare: 0 columns
[st_next_result()]
Execute: 0 columns
dbih_setup_fbav: invalid number of fields: 0 at ./tt line 21.
Database handle destroyed without explicit disconnect.
--
Peter Haworth pmh AT edison.ioppublishing.com
"On two occasions I have been asked [by members of Parliament],
'Pray, Mr. Babbage, if you put into the machine wrong figures, will
the right answers come out?' I am not able rightly to apprehend the
kind of confusion of ideas that could provoke such a question."
-- Charles Babbage
-
compile DBD-ODBC with freetds,
Keith A. Clay, 03/03/1999
- <Possible follow-up(s)>
- Re: compile DBD-ODBC with freetds, Peter Haworth, 03/03/1999
- Re: compile DBD-ODBC with freetds, Tom, 03/03/1999
- Re: compile DBD-ODBC with freetds, Brian Bruns, 03/04/1999
- Re: compile DBD-ODBC with freetds, Peter Haworth, 03/05/1999
- Re: compile DBD-ODBC with freetds, Craig Spannring, 03/05/1999
- Re: compile DBD-ODBC with freetds, Martin Spott, 03/05/1999
- Re: compile DBD-ODBC with freetds, Peter Haworth, 03/17/1999
- Re: compile DBD-ODBC with freetds, Craig Spannring, 03/18/1999
- Re: compile DBD-ODBC with freetds, Peter Haworth, 03/18/1999
- Re: compile DBD-ODBC with freetds, tetherow, 03/18/1999
- Re: compile DBD-ODBC with freetds, Phil Larson, 03/18/1999
- Re: compile DBD-ODBC with freetds, Gregg Jensen, 03/18/1999
Archive powered by MHonArc 2.6.24.