On Wed, Aug 28, 2002 at 11:23:45AM -0600, [EMAIL PROTECTED] wrote:
> Perl version: 5.6.0
> O/S SunOS 5.8
>
> And here is the section of code I'm having a problem with:
>
> 32 use DBI;
> 33 use DBD::Oracle qw(:ora_types);
> 1037 $sth1 = $dbh->prepare($sql)
> 1038 or die "Couldn't prepare $sql; ERROR: " . DBI->errstr;
> 1039 $sth1->bind_param(":clientname", "$client");
> 1040 $sth1->bind_param_inout(":host_cursor",
> 1041 \$sth2, 0, { ora_type => ORA_RSET } )
> 1042 or die "Couldn't bind $sql; ERROR: " . DBI->errstr;
> 1043 $sth1->execute()
> 1044 or die "Couldn't execute $sql; ERROR: " . DBI->errstr;
> 1045 @row = $sth2->fetchrow_array;
> 1046 foreach $row ( @row ) {
> 1047 print STDOUT "host row = $row\n";
> 1048 }
>
> When I get to line 1040 (the bind_param_inout method), the following error
> is generated:
>
> Argument "ORA_RSET" isn't numeric in subroutine entry at ftp_dbload.pl
> line 1040, <LOAD> line 1734.
> Can't bind :host_cursor, ora_type 0 not supported by DBD::Oracle at
> ftp_dbload.pl line 1040, <LOAD> line 1734.
>
This suggests to me that, for some reason, the ORA_RSET constant has not
been imported from DBD::Oracle. I'm not sure why that would happen,
though.
What version of DBI and DBD::Oracle are you using?
Is the use DBD::Oracle line in the same package as the bind_param_inout()
line?
Ronald