I have confirmed that using the following code allows the stored procedure to run as expected to completion.
my $sthTestProc1 = $dbhTestInsert->prepare(qq/exec spTestSelectAndUpda
+te/);
$sthTestProc1->execute();
do {
my @row;
while (@row = $sthTestProc1->fetchrow_array()) {
# do stuff here
}
} while ($sthTestProc1->{odbc_more_results});
I guess any complex procedures should always use this just in case. I just assume that DBI/DBD would somehow know if a stored procedure is still running or not regardless of how many resultsets it has received. Thank you for your help.