execute_array() problem...

From: Amonotod (amonotod_at_charter.net)
Date: 09/28/04

  • Next message: Amonotod: "Re: execute_array() problem..."
    To: <dbi-users@perl.org>
    Date: Tue, 28 Sep 2004 19:13:23 +0000
    
    

    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, \@{$insArrays{$temp_count}});
      $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, <TEXT_DATA> 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____________________________________
      _____|_____|_____|_____|_____|_____|_____|_____|
    

  • Next message: Amonotod: "Re: execute_array() problem..."