RE: DBD::ADO and ODBC Information Code

From: Jeff Urlwin (jurlwin_at_esoftmatic.com)
Date: 01/14/04

  • Next message: Thomas A. Lowery: "Re: DBI::Shell and "/""
    To: "'Peter Hir***'" <peter@hir***.com>
    Date: Tue, 13 Jan 2004 21:44:15 -0500
    
    

    >
    > >>
    > >> Thanks, I have a catch 22 here.
    > >> The ODBC driver returns a value out of range error
    > whenever I do a
    > >> select on a field that is a float.
    > >
    > > Can you please get me a small sample?
    > >
    > > Create table foo ( etc )
    > > Select * from foo;
    > >
    > > Etc?
    > I have very limited access to the database, it is read only.
    > But here are the DBD::ODBC error messages I get when I
    > select 9 columns that happen to be floats.
    >
    > DBD::ODBC::db selectall_arrayref failed: [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003) [Reuters][Open
    > Access]Numeric value out of range (SQL-22003)(DBD:
    > st_fetch/SQLFetch err=-1) at runODBC.pl line 33, <STDIN> line 1.
    >
    > DBD::ADO gets the data:
    > $VAR1 = [
    > {
    > 'OPEN' => '52.7700004577637',
    > 'ASK' => '52.6699981689453',
    > 'CLOSE' => '52.6199989318848',
    > 'LOW' => '52.6199989318848',
    > 'VOLUME' => '1147040',
    > 'BLOCK_TRADE' => '9',
    > 'HIGH' => '52.9900016784668',
    > 'BLOCK_VOLUME' => '702500',
    > 'BID' => '52.5999984741211'
    > }
    > ];

    I'd also like to see a DBI trace (level 9) of the select. I'd like to see
    if I can get a hold of what's happening. I see it's a reuters database, so
    I'm pretty sure I'm not going to be able to replicate it here, but I'd like
    to look into it.

    Jeff

    > >
    > > Thanks,
    > >
    > > Jeff
    > >
    > >> The ADO driver handles floating point fine, but does
    > not like the
    > >> SUCCESS_WITH_INFO messages that come back with a SELECT
    > that produces
    > >> no rows.
    > >> I may have to do a ODBC select without float columns to
    > make sure
    > >> I am going to get a hit, then do an ADO select on the
    > complete field
    > >> list.
    > >>
    > >> Peter
    > >> >>
    > >> >>
    > >> >> Peter Hir*** wrote:
    > >> >>
    > >> >> > I am having a problem when the query returns no rows, if
    > >> >> I get data all
    > >> >> > looks good. When I run $sth->execute() on a SELECT that
    > >> returns no
    > >> >> > rows, the OLE->ODBC driver is returning a 01001 Information
    > >> >> Code, with the
    > >> >> > result. It looks like the ADE driver then enters a long
    > >> >> loop 65531.
    > >> >> > Memory ( > 300 Meg ) && CPU ( 100% ) while this is happening.
    > >> >>
    > >> >> Looks like the SUCCESS_WITH_INFO issue I'm currently working on:
    > >> >>
    > >> >
    > >> > In the mean time, you might try DBD::ODBC and use the
    > ODBC driver
    > >> > directly.
    > >> >
    > >> > Jeff
    > >> >
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    >
    >


  • Next message: Thomas A. Lowery: "Re: DBI::Shell and "/""