SmartSQL
Runs a SQL statement that supports smart parameters.
Syntax
bool SmartSQL (string sStringIn, string sPopulate)Parameters
- The SQL expression that you want to run. Smart parameters are supported within the expression.
- True/False value to enable or suppress populating value of any record that is returned from the SQL expression.
Returns
True, if the SQL statement runs successfully, select statements must also return a value. False, if the SQL statement does not execute successfully.Level
All.Details
Runs the SQL statement that you enter in the first parameter.- Example:
This sequence opens a connection to the InvoiceLook database. Next, it inserts values into the CompanyCode and Type columns of the Vendor table:
OpenConnection("@APPVAR(*/lookupdb:cs)") SmartSQL("INSERT INTO Vendor (CompanyCode,Type) VALUES ('MQSW','New')")Here, dbVendorID is a numeric field, while dbVendorname is the calling text field.
OpenConnection("@APPVAR(*/lookupdb:cs)") SmartSQL("SELECT CompanyCode FROM Vendor WHERE dbVendorID =+@P\VendorID+ AND dbVendorName = '+@F+';",YES)OpenConnection("@APPVAR(*/lookupdb:cs)") SmartSQL("SELECT CompanyCode FROM Vendor WHERE dbVendorID =+@P\VendorID+ AND dbVendorName = '+@F+';",YES)