.executeSQLStatement()

Previous Next

Executes a SQL statement.

Returns the 'this' object.

Syntax

.executeSQLStatement( sql-statement, options )

 

options  ::=  {

    hostvars:  hostvars

,   async:  async

,   hostvars:  hostvars

,   waitState:  wait-state

,   success:  success-function

,   error:  error-function

}

 

async        ::=  { true | false }

wait-state   ::=  { true | false }

 

The required sql-statement identifies the SQL statement to be executed.

Options is a struct that can have the following items, all of which are optional.

Hostvars is a struct containing name-value pairs that specify input values for the SQL statement.

Async is a boolean determining whether the operation is executed asynchronously.

Wait-state automatically adds a loading icon to the application window while the query is being executed. This is especially useful if the server needs an unusually long time to complete.

Success-function is a function called after the operation has successfully completed.

Error-function is a function called if an error occurs.

 

Example

$.udb.executeSQLStatement( 'MySQL', {hostvars: {ID:'NL01234'}, async:true} );

 

 

See Also

SQL Statements