Re: execute_array() problem...

2004-09-29 Thread Tim Bunce
On Tue, Sep 28, 2004 at 08:10:44PM +, amonotod wrote:
> > From: amonotod <[EMAIL PROTECTED]>
> > Date: 2004/09/28 Tue PM 07:13:23 GMT
> 
> You ever have one of those days, where all you needed was to put on your headphones, 
> tune everyone out, and make things work...?
> 
> - $DataInsert->bind_param_array($temp_count, [EMAIL PROTECTED]);
> +   $DataInsert->bind_param_array($temp_count+1, [EMAIL PROTECTED]);
> 
> :-)
> amonotod

The DBI should have caught that for you. It will in the next version.

Tim.


Re: execute_array() problem...

2004-09-28 Thread amonotod
> From: amonotod <[EMAIL PROTECTED]>
> Date: 2004/09/28 Tue PM 07:13:23 GMT


You ever have one of those days, where all you needed was to put on your headphones, 
tune everyone out, and make things work...?

- $DataInsert->bind_param_array($temp_count, [EMAIL PROTECTED]);
+   $DataInsert->bind_param_array($temp_count+1, [EMAIL PROTECTED]);

:-)
amonotod


--

`\|||/ amonotod@| sun|perl|windows
  (@@) charter.net  | sysadmin|dba
  ooO_(_)_Ooo
  _|_|_|_|_|_|_|_|



execute_array() problem...

2004-09-28 Thread amonotod
Hello all,
  I'm having a problem with execute_array.  Below is the relevant code:

# Build up parameter binds...
while ($temp_count < $colttl) {
  $DataInsert->bind_param_array($temp_count, [EMAIL PROTECTED]);
  $temp_count++;
}
# insert data
unless ($DataInsert->execute_array( { ArrayTupleStatus => \my @tuple_status } )  ) {
  print LOGFILE "\nErrors were encountered during data load...\n";
  print LOGFILE "errors: $dbh->errstr \n";
  print "@tuple_status\n";
}

   However, no matter how I manipulate the arrays, the execute statement, or whatever 
else, I get errors.  The latest (and closest to success, I think) is:

DBD::ODBC::st execute_array failed: [Microsoft][ODBC SQL Server Driver]Invalid 
character value for cast specification (S
QL-22018)(DBD: st_execute/SQLExecute err=-1) at D:\development\dbd_db.pl line 456, 
 line 1.

  Now, obviously, that's an error straight from SQL Server about stuffing data into an 
incompatible column.  However, I've stripped my input down to a single row, so I'm 
passing single 'cell' arrays to the execute_array.  I've verified the data in each 
column (with print statements not shown above), and believe that the data is being 
bound to the correct columns...  :-(

  Oh, and before I switched to execute_array, I didn't have any errors like this...  
:-)

  So, any ideas?

Thanks,
amonotod


--

`\|||/ amonotod@| sun|perl|windows
  (@@) charter.net  | sysadmin|dba
  ooO_(_)_Ooo
  _|_|_|_|_|_|_|_|