Executing SQL Directly

For users experienced with SQL databases, an executeSQL() function is available to run any SQL statement directly. It returns a list of property lists for a select statement or for other statements that return information. SQL statements that perform operations without returning any information will return an empty list. Any errors throw an exception.

Note: For SQL select statements that return one or more rows from a table, the executeSQL() function will not return SenseTalk record objects. The values that are returned in this case are ordinary property lists with no connection to the database.

The executeSQL() function takes two parameters: the database connection, and the SQL statement to be executed.

Example:

put executeSQL(myDB, "select * from Members") into listOfRowInformation

 

This topic was last updated on October 11, 2019, at 11:18:54 AM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant