There are properties of the statement handle that you can use to get
this info.
Try something like this (for select statements only) after you execute
the sql statement.

for ($cnt = 0; $cnt < $sth->{NUM_OF_FIELDS}; $cnt++)
{
  print "$sth->{NAME}->[$cnt]\n";
}

See the section on Statement Handle Objects in Appendix A of Programming
the Perl DBI for more info.

-Josh

-----Original Message-----
From: Georg Botorog [mailto:georg@;huggle.de] 
Sent: Friday, November 01, 2002 8:58 AM
To: [EMAIL PROTECTED]
Subject: OCI Stmt Info
Importance: Low


Hi,

I am using DBI and DBD::Oracle. Is there any possibility to get the
names of the bind variables back from OCI, such as returned by
OCIStmtGetBindInfo()?

The background is: I get a statement (defined elswhere) where the
placeholders for the bind variables have the syntax ":name" (not "?")
together with the necessary values. To bind the variables, I need to
know their names (binding by position does not work here). Of course, I
could parse the statement, and get the variable names. However, OCI has
this information already, thus it would be silly not to use it. So my
question is: does DBI, DBD, or any other package pass this information
from OCI?

Thanks,
G. Botorog

Reply via email to