Yesterday I sent out a problem where I was getting Invalid Cursor State.
After talking to the guy who wrote the stored procedure, found out that :
"For this stored procedure, there is no result set and, therefore, no cursor
returned which would explain why you get an invalid cursor state. The data
comes back through the parameter."
ARGH!
So, modified the code to read :
$stp_cur = $dbh->prepare('call TESTPROC(?)');
$stp_cur->bind_param_inout(1, \$pin, 5000 );
$ret_code = $stp_cur->execute();
print "Pin is : $pin\n"
And works like a charm. Thanks to those who responded with helpful ideas!
Guess this falls into RTFM. :)