In a Bind

  • Someone please tell me I'm reading this wrong;

    I read this as;

    If you're using the Oracle JDBC drivers then you should use the Oracle
    style of bind variables, ":NNN" style, rather than the standard JDBC
    "?" character, because it's faster. You should be able to use
    ":AnyNameYouLike", but you can't because the JDBC drivers are broken,
    and have been for ages. So you have to just use numbers to name them.
    The numbers however don't actually mean anything, you still have to
    bind them in exactly the same way as if they were standard JDBC "?"
    characters! In the example they have the binds ":54", ":2", ":17",
    ":2", ":11" and ":99" which you have to bind (with
    "setWhereClauseParam", even though some of them aren't in the where
    clause!) as 0, 1, 2, 3, 4 and 5. Remembering that you have to bind ":2"
    twice, in different positions, obviously.

    Surely I'm misunderstanding this, otherwise WTF is the point of Oracle having their own special bind variable style?

  • Just use ?, it works without problems. I think the ": style is faster" stuff is bullshit.

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.