After yesterday's dummy question, I'm afraid to reveal more of my
ignorance, but here goes.
I think that this code:
$SQLstmt =
q{ alter user :DBUser identified by blarg };
print "1 Executing ",$SQLstmt, "\nfor ${pwUSR}\@${pwSID} - newpw is
$pwNEWPW\n";
$SQLh = $DBh->prepare( $SQLstmt,{ora_check_sql => 0} );
print "2 Executing ",$SQLstmt, "\nfor ${pwUSR}\@${pwSID} - newpw is
$pwNEWPW\n";
$SQLh->bind_param( ":DBUser", uc($pwUSR) );
print "3 Executing ",$SQLstmt, "\nfor ${pwUSR}\@${pwSID} - newpw is
$pwNEWPW\n";
...ought to work. However, I get these errors...
1 Executing alter user :DBUser identified by blarg
for dw@DWT - newpw is atari800
2 Executing alter user :DBUser identified by blarg
for dw@DWT - newpw is atari800
DBD::Oracle::st bind_param failed: ORA-01036: illegal variable
name/number (DBD ERROR: OCIBindByName) [for Statement " alter user
:DBUser identified by blarg " with ParamValues: :dbuser='DW'] at
./cpw1.pl line 273, <DATF> line 54.
DBD::Oracle::st bind_param failed: ORA-01036: illegal variable
name/number (DBD ERROR: OCIBindByName) [for Statement " alter user
:DBUser identified by blarg " with ParamValues: :dbuser='DW'] at
./cpw1.pl line 273, <DATF> line 54.
I can execute the command 'alter user DW identified by blarg' without
any errors, and I've never had any problems with parameter replacement
before. I have tried both named parameters (:DBUser) and blind
parameters ('?') to no avail.
What am I not seeing?
Thanks,
Mike