DBD::ODBC error

  • From: "Koivu, Lisa" <Lisa.Koivu@xxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 27 Feb 2004 15:12:43 -0500

Hi everyone, 

The script below throws the following error:  "DBD::ODBC:st execute
failed: [Microsoft ODBC SQL Server Driver]Connection is busy with
results for another hstmt(SQL-HY000)(DBD: st_execute/SQLExecute err=-1)
at tests.pl line 20."

What on earth?  I am trying to parameterize the update statement and
it's failing.

For the record, I tried concatenating the unique_id's into one string
and using an IN() statement, but I received the following errors (with
and without using SQL_VARCHAR and explicitly binding the parameters):

DBD::ODBC::st execute failed: [Microsoft}{ODBC SQL Server Driver]Invalid
character value for cast specification (SQL-22018)...

My in-list looked like this:  217, 219, 221, 222   

The statements both work in query analyzer. 

Has anyone ever seen this before?  Any comments or suggestions are
appreciated. 

Thank you
Lisa Koivu



#!/usr/bin/perl -w
use strict;
use DBI;

my $dbh_ss = DBI->connect("dbi:ODBC:briorep","brioadmin","Password01")
         or die "Cant connect to db:  $DBI::errstr\n";

my $stmt_getid = qq{SELECT unique_id FROM briojobs WHERE
completion_status <> 'Successful' and completion_status IS NOT NULL AND
file_name LIKE 'D%'};
my $sth_getid = $dbh_ss->prepare($stmt_getid);

my $stmt_upd = qq{UPDATE briojobs SET next_date = NULL, last_date =
NULL, completion_status = NULL WHERE unique_id = ?  };
my $sth_upd = $dbh_ss->prepare($stmt_upd);

$sth_getid->execute();

while (my @array = $sth_getid->fetchrow_array) {

        #Fails here, every time
    $sth_upd->execute($array[0]);
sleep 1;
    
};

Lisa Koivu
desk: 407-248-4277
cell: 954-683-4459 



"The sender believes that this E-Mail and any attachments were free of any 
virus, worm, Trojan horse, and/or malicious code when sent. This message and 
its attachments could have been infected during transmission.  By reading the 
message and opening any attachments, the recipient accepts full responsibility 
for taking proactive and remedial action about viruses and other defects. The 
sender's business entity is not liable for any loss or damage arising in any 
way from this message or its attachments."

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: