Skip to Main Content

Programming Languages & Frameworks

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

bind parameters as an array of objects

User514049-OracleMay 1 2017 — edited May 7 2017

All:

Is it possible to pass an array of bind variables i.e. w/o names, just as positional objects?

"INSERT INTO countries VALUES (:country_id, :country_name)",

  {

  country_id: { val: 90, dir: oracledb.BIND_IN, type: oracledb.NUMBER },

  country_name: { val: "Tonga", dir: oracledb.BIND_IN, type:oracledb.STRING }

  }

  [

     { val: 90, dir: oracledb.BIND_IN, type: oracledb.NUMBER },

     { val: "Tonga", dir: oracledb.BIND_IN, type:oracledb.STRING }

  ]

Some specifications like ODBC/JDBC support ? as bind parameter marker -- insert into countries values(?.?).   It will be useful in such cases.

With regards

Comments
Post Details
Added on May 1 2017
3 comments
3,506 views