Thread: dbi->prepare messes up
10-12-03, 13:34 #1Registered User
- Join Date
- Oct 2003
Unanswered: has anyone seen this? dbi->prepare messes up
I am trying to do a simple thing without success.
FYI: Using Oracle8 DB/SUN-Solaris and Perl 5.8/SUN-Solaris
I attempted to create a statement handler with 3 params and execute it.
$sth_upd_sttime = $dbh->prepare ("update table_a
set ? = ?
where COLUMN2= ?");
DBD::Oracle::st execute failed: ORA-01747: invalid user.table.column, table.column, or column specification (DBD ERROR: OCIStmtExecute) [for statement ``update table_a set ? = ? where COLUMN2 = ?'' with params: 3=354, 1='COL1', 2=5000]) at /abc/prog1.pl line 226.
Now I found that when I hardcode the column name and take out the first parameter - everything works out fine. I then had to duplicate the prepare by 4. This is inefficient and I cannot seem to find out the reason this is happening.
I checked the colname, I tried putting the name in a single quote. I tried putting all in double quote. No luck.
Has anyone got suggestions?
Last edited by apple2; 10-13-03 at 07:25.