On Wed, 20 Apr 2005 13:46:13 -0700, "Tim" <[EMAIL PROTECTED]> said:
> The t/50cursor.t test script in the DBD::Oracle distribution uses that
> code to close the cursors that it has opened.

OK, I tried using that code to test my local installation. I had trouble
running the tests per se via the CPAN module, because it wants me to
make DBD::Oracle first and I don't have a compiler on this machine, but
I've copied 50cursor.t into another file and replaced the calls to ok()
with more basic error checking.

It runs through all the calls fine until it gets to the last one,
$close_cursor->execute.

At that point Oracle throws an error:

  ORA-01008: not all variables bound (DBD: oexec error)

even though the call immediately preceding was 

  $close_cursor->bind_param( ":kursor", $cursor, { ora_type => ORA_RSET
  });

which succeeded. These two calls are copied directly from 50cursor.t.

The documentation for DBD::Oracle has a slightly different syntax for
binding cursors before closing:

 $sth->bind_param_inout(':cursor', \$cursor, 0, { ora_type =>
 ORA_RSET});

If I use that call instead, I get this error:

  ORA-01023: Cursor context not found (Invalid cursor number) (DBD:
  odescr failed)

I've attached my test script in case anyone should want to look at it.
I've read somewhere that the 'odescr failed' error may have something to
do with DBD::Oracle being compiled for the Oracle 7 API, which may
explain the errors. Could that be the case?

Any other suggestions as to why I'm unable to use code that clearly
works in the test suite would also be very useful.

Thanks for all the assistance so far!

Mike
 


Attachment: cursortest.pl
Description: Binary data

Reply via email to