Skip to Content.
Sympa Menu

freetds - Re: prerelease delayed by documentation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Eric Deutsch" <edeutsch AT systemsbiology.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: prerelease delayed by documentation
  • Date: Wed, 4 Sep 2002 10:39:42 -0700



Hi Bill, thanks for doing this. I compiled your program on Linux x86
and I get exactly the same output as you (except for the datetime column
for which I also see the time). So I'm a little baffled. From this C
point of view, ODBC does appear to be working just fine. My connection
via DBD::ODBC isn't doing as well. Maybe I should try upgrading
DBD::ODBC. I can't think of anything else.

The "Invalid Cursor State" suggests to me that the previous resultset
wasn't officially closed properly before the next DROP statement. I
didn't investigate. I do get the same error.

Thanks,
Eric


> -----Original Message-----
> From: Thompson, Bill D (London) [mailto:ThompBil AT exchange.uk.ml.com]
> Sent: Wednesday, September 04, 2002 4:52 AM
> To: TDS Development Group
> Subject: [freetds] Re: prerelease delayed by documentation
>
> Eric,
>
> I was concerned about your reported problems with ODBC.
>
> I have solaris 2.6
> Freetds latest snapshot
> unixodbc (2.2.2)
>
> I got this together because of all the work we did with the data
> conversion
> code
> Although utterly unfamiliar with ODBC , I managed to concoct a simple
test
> harness, returning data of different types.
> All looks OK to me with my harness. here it is:
>
> <<odbctest.c>> <<make_odbc>>
>
> perhaps you'd like to try it out and see if you get similar results.
My
> output looks like this:
>
> I cant figure out why my final drop table doesn't work I've probably
done
> something dumb :-)
>
> odbctest
> --------
>
> connection parameters:
> server: 'MS_GLOSS'
> user: '<changed>'
> password: '<changed>'
> database: 'CTRL_ET2_BAR'
> use CTRL_ET2_BAR
> drop table odbctestdata
> create table odbctestdata (col1 varchar(30) not null,col2 int not
> null,col3
> float not null,col4 numeric(18,6) not null,col5 datetime
> not null)
> insert odbctestdata values
> ('ABCDEFGHIJKLMNOP',123456,1234.56,123456.78,'Sep
> 11 2001 10:00AM')
> select * from odbctestdata
> output data >ABCDEFGHIJKLMNOP< len_or_ind = 256
> output data >123456< len_or_ind = 256
> output data >1234.56< len_or_ind = 256
> output data >123456.780000< len_or_ind = 256
> output data >Sep 11 2001< len_or_ind = 256
> drop table odbctestdata
> Unable to drop table odbctestdata
> SQL error 24000 -- [unixODBC][Driver Manager]Invalid cursor state
>
> > -----Original Message-----
> > From: Eric Deutsch [SMTP:edeutsch AT systemsbiology.org]
> > Sent: Tuesday, September 03, 2002 8:36 PM
> > To: TDS Development Group
> > Subject: [freetds] Re: prerelease delayed by documentation
> >
> >
> > > From: Brian Bruns [mailto:camber AT ais.org]
> > [...]
> > > > > Is ODBC working with DBD::ODBC now? There was a
> > > > > problem as I recall. Others?
> > > >
> > > > I don't plan to test ODBC.
> > >
> > > I don't have the time. Maybe Eric will update us on its
viability?
> >
> > I would be delighted to! I just downloaded the latest from CVS, ran
a
> > bunch of DBD::Sybase tests and all seems to be working fine. I then
ran
> > the DBD::ODBC tests, and there are a bunch of issues. Some queries
do
> > work fine, but others do not, apparently due to the column types of
the
> > columns requested. Here's the information. My debugging skills are
> > limited, but I stand ready to assist in any way I can!
> >
> > I compared identical queries using Perl DBD::Sybase with DBD::ODBC.
> > DBD::Sybase appears to work flawlessly in all my tests. Same exact
> > program used for both drivers, I just switched the DSN back and
forth to
> > test both Sybase and ODBC.
> >
> > Setup includes:
> > Red Hat 7.2 Linux
> > Perl 5.6.1
> > DBI 1.18
> > FreeTDS (CVS version from 2002-09-03 11:00am PDT)
> > DBD::Sybase 0.94
> > DBD::ODBC 0.30
> > unixODBC 2.0.7
> > Built with: ./autogen.sh --with-tdsver=7.0 --with-unixodbc=/usr
> > --with-ssl
> >
> > Summary:
> >
> > -FLOAT fields truncated after first digit and core dump.
> > -REAL fields truncated after first digit. But no core dump.
> > -DATETIME fields truncated after first digit and core dump.
> > -TEXT fields are not terminated properly can cause error and core
dump.
> > -Server error messages are not reported nicely (or at all,
actually).
> >
> > Also: column type numbers in $sth->{TYPE} (displayed below after the
> > column name) are different between the two drivers. Is this a known
> > situation or an error? It makes writing code that can work with
either
> > driver awkward.
> >
> > Detailed output is below. I can send TDSDUMPs for any or all of the
> > various queries if desired.
> >
> > Many thanks!
> > Eric
> >
> >
> > -------------------------------------------------
> > Details:
> >
> >
> > Using DBD::Sybase
> >
> > [QUERY]: SELECT test_id,intfield,floatfield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (floatfield): 6 --> float
> > =1|20|3.1415=
> > =2|25|2.17=
> > =3|30|1.23456789012346=
> > =4|35|-500=
> > =5|50|1.23=
> >
> >
> > Using DBD::ODBC
> >
> > [QUERY]: SELECT test_id,intfield,floatfield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (floatfield): 8 --> 8
> > =1|20|3=
> > =2|25|2=
> > =3|30|1=
> > =4|35|-=
> > =5|50|1=
> > Segmentation fault (core dumped)
> >
> > FLOAT fields truncated after first digit and core dump.
> >
> >
> > Using DBD::Sybase
> >
> > [QUERY]: SELECT test_id,intfield,charfield,realfield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (charfield): 1 --> varchar
> > 3 (realfield): 7 --> real
> > =1|20|butter?|2.77699995040894=
> > =2|25|milk|2.77699995040894=
> > =3|30|swamp gas|2.77699995040894=
> > =4|35|pillow|2.77699995040894=
> > =5|50|chicken|2.77699995040894=
> >
> >
> > Using DBD::ODBC
> >
> > [QUERY]: SELECT test_id,intfield,charfield,realfield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (charfield): 12 --> 12
> > 3 (realfield): 6 --> float
> > =1|20|butter?|2=
> > =2|25|milk|2=
> > =3|30|swamp gas|2=
> > =4|35|pillow|2=
> > =5|50|chicken|2=
> >
> > REAL fields truncated after first digit. But no core dump.
> >
> >
> >
> > Using DBD::Sybase
> >
> > [QUERY]: SELECT test_id,intfield,charfield,datefield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (charfield): 1 --> varchar
> > 3 (datefield): 11 --> date
> > =1|20|butter?|2000-01-25 18:00:00=
> > =2|25|milk|2001-01-22 00:00:00=
> > =3|30|swamp gas|1998-05-10 22:11:00=
> > =4|35|pillow|2002-09-03 11:37:11=
> > =5|50|chicken|2002-09-03 11:37:11=
> >
> >
> > Using DBD::ODBC
> >
> > [QUERY]: SELECT test_id,intfield,charfield,datefield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (charfield): 12 --> 12
> > 3 (datefield): 11 --> date
> > =1|20|butter?|2=
> > =2|25|milk|2=
> > =3|30|swamp gas|1=
> > =4|35|pillow|2=
> > =5|50|chicken|2=
> > Segmentation fault (core dumped)
> >
> > DATETIME fields truncated after first digit and core dump.
> >
> >
> >
> > Using DBD::Sybase
> >
> > [QUERY]: SELECT test_id,intfield,charfield,textfield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (charfield): 1 --> varchar
> > 3 (textfield): -1 --> text
> > =1|20|butter?|some text=
> > =2|25|milk|more text=
> > =3|30|swamp gas|no text, or is it text*=
> > =4|35|pillow|There are quite a few perl modules and classes - do not
> > worry, there is no need to understand them all, unless you really
want
> > to get in the thick of development. If you want to just use the
tools,
> > available, look at the instructions for the script you want in the
> > scripts/ directory. A good starting place for writing tools is by
> > looking at the existing ones in the scripts/ directory. You will
notice
> > that the clients (scripts) are generally quite thin, with the
majority
> > of the clever stuff happening in the modules themselves.=
> > =5|50|chicken|no text, or is it text?=
> >
> >
> > Using DBD::ODBC
> >
> > [QUERY]: SELECT test_id,intfield,charfield,textfield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (charfield): 12 --> 12
> > 3 (textfield): -1 --> text
> > =1|20|butter?|some text
> > =2|25|milk|more text
> > =3|30|swamp gas|no text, or is it text*@=
> > Error during retrieval
> > Error 1 ([unixODBC][Driver Manager]Data source name not found, and
no
> > default driver specified (SQL-IM002)(DBD: st_fetch/SQLFetch (long
> > truncated) err=1))
> > Segmentation fault (core dumped)
> >
> > TEXT fields are not terminated properly can cause error and core
dump.
> >
> >
> >
> > Using DBD::Sybase: request for a non-existent column:
> >
> > Error 207 (Server message number=207 severity=16 state=3 line=1
> > server=MSSQL01 text=Invalid column name 'varcharfield'.)
> >
> > Using DBD::ODBC: request for a non-existent column:
> > Error -1 ([unixODBC][Driver Manager]Data source name not found, and
no
> > default driver specified (SQL-IM002)(DBD: st_execute/SQLExecute
err=-1))
> >
> > Server error messages are not reported nicely.
> >
> >
> >
> >
> >
> >
> > ---
> > You are currently subscribed to freetds as:
> [thompbil AT exchange.uk.ml.com]
> > To unsubscribe, forward this message to
> > $subst('Email.Unsub')




Archive powered by MHonArc 2.6.24.

Top of Page