develooper Front page | perl.beginners | Postings from September 2009

Re: Limit on number of columns pulled using DBI::ODBC

Thread Previous | Thread Next
From:
Steve Bertrand
Date:
September 30, 2009 18:41
Subject:
Re: Limit on number of columns pulled using DBI::ODBC
Message ID:
4AC40835.7080001@ibctech.ca
Tony Esposito wrote:
> Is there a limit on the number of columns pulled from a table using DBI::ODBC?

Although I just received your own reply to this message, I'll respond to
this one as I have some questions.

> I am getting an 'out of memory' error if I try to retrieve 40 columns or more when using the following ...

Are you referring really to "columns", or do you mean 'rows'?

> my $dbh = DBI->connect( dbi:ODBC:orcl, "login", "password",
>                          { RaiseError => 1 }
>                       ) || die "Database connection not made: $DBI::errstr";
> ....

It would be prudent for you to explain what you have in '...' here. ie.
what does your select statement say?

> while (my $tableRef = $sth->fetchrow_arrayref) {
> ...
> }

...again, I can't tell if you are really configuring a statement to
acquire just the table column headings (because you haven't shown us
your SQL statement), or if you are using the terminology 'columns' when
you really mean 'rows'.

Without knowing either Oracle or your statement, I'd have to assume that
it may help if you throw a 'limit N' at the end of your statement.

Grab what you can from the db using 'limit', write a function that
checks the next id in the table and then grabs the next N number of rows.

fwiw, $dbh->{LongReadLen} = 20000; is something I've never seen before...

What is it you are trying to do exactly?

Steve

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About