Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The API can also be called in the form of a method attached to a statement object as follows: stmt.setAttr().

Parameters
  1. The handle which is created from pjs.prepare() or pjs.allocStmt(). This parameter is omitted if the API is called as a statement method.

  2. Attribute to change

  3. New attribute value

Attributes and their valid values
  • profound.SQL_ATTR_CURSOR_SENSITIVITY

    • profound.SQL_INSENSITIVE

    • profound.SQL_SENSITIVE

  • preciseDecimal

    • Set to string or boolean value before executing query to override global preciseDecimal setting for statement result sets.

Exception Handling

Examples

Called directly
Code Block
languagejavascripttitleCalled directlyjs
var c1 = pjs.allocStmt(); 
pjs.setStmtAttr(c1, SQL_ATTR_CURSOR_SCROLLABLE, SQL_TRUE);
// ...

Called as a method
Code Block
languagejavascripttitleCalled as a methodjs
var c1 = pjs.prepare("SELECT * FROM productsp WHERE prid = ?");
c1.setAttr(SQL_ATTR_CURSOR_SCROLLABLE, SQL_TRUE);
// ...

Requirements

This API requires the Profound.js Connector module.