Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Production Management

Using parameters in OLE-DB adapter

  • Last UpdatedSep 06, 2023
  • 2 minute read

Typically, you use parameters in two contexts:

  • Select parameters - You frequently retrieve only a subset of the data in a database. To do this, use an SQL statement that includes a WHERE clause with a parameter for selection criteria that you get at run time.

    For example, the Select statement SELECT orderid FROM orders WHERE orderid=10300 results in a value of 10300.

    Also, when you update or delete records, you can use a WHERE clause that specifies the record or records to change. AVEVA™ Production Management usually derives the values in the WHERE clause at run time.

  • Update parameters - When you update an existing record or insert a new one, AVEVA Production Management establishes the values for the columns in the changed or new record at run time. Also, AVEVA Production Managementuses parameters to establish values for optimistic concurrency checking.

    SQL statement

    Comments

    SQL Select statement

    Can contain parameters.

    SQL Delete statement

    • Contains parameters.

    • Require a parameterized WHERE clause that identifies the record to be updated.

    SQL Insert statement

    • Contains parameters.

    • Require parameters for every column in the database that is to be updated.

    SQL Update statement

    • Contains parameters.

    • Require parameters for every column in the database that is to be updated.

    • Require a parameterized WHERE clause that identifies the record to be updated.

    Tip: You can construct an SQL statement with question marks (?) as parameter placeholders. AVEVA Production Management replaces the question marks at run-time with the parameters that you defined for the statement. AVEVA Production Management replaces the first question mark in the statement with the first parameter in the collection, the second question mark in the statement with the second parameter in the collection, and so on.

Related Links
TitleResults for “How to create a CRG?”Also Available in