Re: ORA-03124

Junji Ochi <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
Dear Richie ,

Thank you for your prompt email reply

Your advice made it work fine!

#### code ####
use DBI qw(:sql_types); # adding
.....
$sth->bind_param( 
1,'84c8aab5140cbf000a3ddaf80257b7c2695b6c23',SQL_CHAR);# modified
#### code end ####

But, same error was happend when using CGI::Session->load() function.
This is our true problem.

/////qw start CGI::Session->load()/////
DBD::Oracle::st fetchrow_array failed: ORA-03124: two-task internal 
error (DBD ERROR: OCIStmtFetch) [for Statement "SELECT a_SESSION FROM 
TEST_TB WHERE ID=?" with ParamValues: 
:p1='84c8aab5140cbf000a3ddaf80257b7c2695b6c23'] at 
CGI/Session/Driver/DBI.pm line 74.
/////qw end/////

mentioned perl codes can reproduce same error as using CGI::Session->load().

I supposed that CGI::Session->load() uses same logic.
CGI::Session->load() seem not have bind_param otption.

and CGI::Session::DBI manual says that CAHR data type
is recommended for ID column.
ref: 
http://search.cpan.org/~rsavage/CGI-Session-Driver-oracle-1.05/lib/CGI/Session/Driver/oracle.pm

Our boss want to know 'Why'
I'd appreciate it if you could answer about this root cause.

Regards,

#### code CGI::Session->load() ####
$s2 = CGI::Session->load(
         'driver:Oracle',
         '84c8aab5140cbf000a3ddaf80257b7c2695b6c23',
         { TableName => 'TEST_TB',
                 IdColName   => 'ID',
                 DataColName => 'a_SESSION',
                 Handle      => $dbh,
           }
);

$rv =$s2->param('_SESSION_ID');
print "$rv \n";

#### code end #####################


(2013/12/17 12:30), Richie wrote:
> On 12/16/2013 10:06 PM, Junji Ochi wrote:
>
>>
>> $sql1 = "SELECT a_SESSION FROM TEST_TB WHERE ID=?";
>> $sth = $dbh->prepare($sql1);
>> $sth->bind_param( 1,'84c8aab5140cbf000a3ddaf80257b7c2695b6c23');
>>
>
> Unconfirmed but have you tried adding in a bind type to the bind_param
> call ie SQL_CHAR
>
> ref: http://search.cpan.org/~timb/DBI-1.630/DBI.pm#bind_param
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.