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

2009-09-30 Thread Steve Bertrand
Tony Esposito wrote: Please try to fix your email application (Yahoo) to wrap lines at ~76 chars per line ;) > I am trying to retrieve all columns and some (not all) rows from an Oracle > table which contain - among other things - 2 CLOB columns and print this to a > flat file (ASCII file). >

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

2009-09-30 Thread Tony Esposito
After doing some research, it looks like I am having problems either retrieving CLOBs or just that the source database (Oracle 10gr2) is set to UTF-8 character set. I am trying to retrieve all columns and some (not all) rows from an Oracle table which contain - among other things - 2 CLOB colum

shift() from the caller() stack?

2009-09-30 Thread Steve Bertrand
Hi all, I am trying to rectify a 'bug' that I've created, and hence wrote a test for. The code is within an error module, which is allowed to die() the program upon failure. To compensate for this within the test, I use eval(). In this case however, I'm testing an 'add_trace()' method, that dies

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

2009-09-30 Thread Steve Bertrand
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

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

2009-09-30 Thread Tony Esposito
I notice the behaviour changes as I adjust the following parameter ...  $dbh->{LongReadLen} = 2; This is an Oracle database I am going against - version 10gR2 --- On Wed, 30/9/09, Tony Esposito wrote: From: Tony Esposito Subject: Limit on number of columns pulled using DBI::ODBC To: "Begi

Re: How to fill an array from multiple row in a db

2009-09-30 Thread Bruce Ferrell
Jim Gibson wrote: > On 9/30/09 Wed Sep 30, 2009 11:33 AM, "Bruce Ferrell" > scribbled: > >> >> Shawn H Corey wrote: >>> Bruce Ferrell wrote: I have a database (mysql if it matters) and I can select columns and rows from it no problem. what I can't quite seem to see how to do is to

Re: How to fill an array from multiple row in a db

2009-09-30 Thread Jim Gibson
On 9/30/09 Wed Sep 30, 2009 11:33 AM, "Bruce Ferrell" scribbled: > > > Shawn H Corey wrote: >> Bruce Ferrell wrote: >>> I have a database (mysql if it matters) and I can select columns and >>> rows from it no problem. what I can't quite seem to see how to do is to >>> take the columns I can

Re: How to fill an array from multiple row in a db

2009-09-30 Thread rkb
Bruce Ferrell wrote: > [snip] > > OK if I read these right and I understand the results of > my experiments > correctly, this: > > @rtn = $sth->fetchrow_array(); > > is giving me an array with two elements and this: > > push @data, [ @rtn ]; > > is giving me an array of 2 element arrays. Not good

Re: How to fill an array from multiple row in a db

2009-09-30 Thread Shawn H Corey
Bruce Ferrell wrote: OK if I read these right and I understand the results of my experiments correctly, this: @rtn = $sth->fetchrow_array(); is giving me an array with two elements and this: push @data, [ @rtn ]; is giving me an array of 2 element arrays. Not good as what I want is 2 arrays

Re: How to fill an array from multiple row in a db

2009-09-30 Thread Bruce Ferrell
Shawn H Corey wrote: > Bruce Ferrell wrote: >> I have a database (mysql if it matters) and I can select columns and >> rows from it no problem. what I can't quite seem to see how to do is to >> take the columns I can select and put them into a 2 dimensional array. >> >> I tried this: >> >> @data

Re: How to fill an array from multiple row in a db

2009-09-30 Thread Shawn H Corey
Bruce Ferrell wrote: I have a database (mysql if it matters) and I can select columns and rows from it no problem. what I can't quite seem to see how to do is to take the columns I can select and put them into a 2 dimensional array. I tried this: @data = $sth->fetchrow_array(); and it got a t

How to fill an array from multiple row in a db

2009-09-30 Thread Bruce Ferrell
I have a database (mysql if it matters) and I can select columns and rows from it no problem. what I can't quite seem to see how to do is to take the columns I can select and put them into a 2 dimensional array. I tried this: @data = $sth->fetchrow_array(); and it got a two dimensional array o

Limit on number of columns pulled using DBI::ODBC

2009-09-30 Thread Tony Esposito
Is there a limit on the number of columns pulled from a table using DBI::ODBC?   Database: Oracle 10gR2 O/S:  WIndowsXP Perl: 5.8.9   I am getting an 'out of memory' error if I try to retrieve 40 columns or more when using the following ...   my $dbh = DBI->connect( dbi:ODBC:orcl, "login", "passwo

Re: Reading from multiple pipes

2009-09-30 Thread Ed Avis
Ed Avis waniasset.com> writes: >I'd like to fork several child processes and read lines from each It appears that IO::BufferedSelect does what I want! From its documentation: use IO::BufferedSelect; my $bs = new BufferedSelect($fh1, $fh2); while(1) { my @ready = $bs->re

Re: Reading from multiple pipes

2009-09-30 Thread Ed Avis
Ed Avis waniasset.com> writes: >I'd like to fork several child processes and read lines from each, There is IO::Select which provides a convenient way to see which filehandles have data for reading. But there is no guarantee that the data available will form a complete line. I am looking for s

Reading from multiple pipes

2009-09-30 Thread Ed Avis
I'd like to fork several child processes and read lines from each, for example: open my $fh_foo, '-|', 'yes', 'foo' or die $!; open my $fh_bar, '-|', 'yes', 'bar' or die $!; while (<$fh_foo> OR <$fh_bar>) { # magic happens here say "got a line from one of them: $_