Hello Tim,

I'm very interested by DBI->trace method.
I gave a look in DBI.pm, I can't find the implementation.

Where it is ?
What is the meaning of this line: 

'trace' =>      { U =>[1,3,'[$trace_level, [$filename]]'],      O=>0x04 },

Thanks in advance for your help.

José.

> -----Original Message-----
> From: Tim Bunce [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, September 19, 2002 10:59 AM
> To: Dolan, Mark
> Cc: Perl Users Help (E-mail)
> Subject: Re: Problem populating execute using @array.
> 
> 
> Use trace.
> Use trace.
> Use trace.
> 
> Tim.
> 
> On Wed, Sep 18, 2002 at 02:35:02PM -0400, Dolan, Mark wrote:
> > I am trying to update a table in an Oracle database. I am 
> reading an 
> > input file which has the column names for the database as the first 
> > record in the file. The data begins in the second row. I read the 
> > first record to pull off the column names. I create the sql using 
> > placeholders. I then read the rest of the file. At the end 
> of the loop 
> > I attempt to perform the 'execute' using the statement 
> handle of the 
> > database. I get the following error.
> > 
> > DBD::Oracle::st execute failed: ORA-01722: invalid number 
> (DBD ERROR:
> > OCIStmtExecute) at ./ins line 61, <$FH> line 1.
> > 
> > At the time of the execute @ins = "20", "00002", "Hello, Dolly", 
> > "000", "01", "022"
> > 
> > 
> > # assume sth is a valid statement handle
> > # assume $FH is a handle to an opened file 
> > my $columns = <$FH>; 
> > # 
> > # read first record of input file 
> > # split the column headers 
> > # 
> >   my $columnitem; 
> >   chomp($columns); 
> >   @ins = split /\|/, $columns; 
> >   foreach $columnitem (@ins) { 
> >    $columnitem = "\"".$columnitem."\""; 
> >   } 
> > my $formatcolumns=join ( ', ', @ins ); 
> > my $valstring= join ( ', ' , ('?') x scalar @ins ); 
> > my $sql= "INSERT INTO $table ( $formatcolumns ) VALUES ( 
> $valstring) "; 
> > while ( my $line = <$FH> ) 
> > { 
> > # 
> > # split the data fields 
> > # 
> >      chomp($line); 
> >      my $field; 
> >      @ins = split /\|/, $line; 
> >      foreach $field (@ins) { 
> >         $field = "\"".$field."\","; 
> >      } 
> >      chop($ins[-1]); # remove comma from last item in array 
> >      #the actual sequence 
> >      $sth->execute(@ins) or $err++; 
> > } 
> > 
> 


**** DISCLAIMER ****

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.

Reply via email to