Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Question Unanswered: has anyone seen this? dbi->prepare messes up

    Hi,
    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.

    The statement:
    $sth_upd_sttime = $dbh->prepare ("update table_a
    set ? = ?
    where COLUMN2= ?");

    Execute command:
    $sth_upd_durtime->execute("COL1",$number,$curVal);

    Error message:
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •