ssCore.ADO.execSQL

Allows you to execute a SQL statement.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

sql - Any SQL statement valid for the selected provider.


Output Parameters:

adoError - An ADO specific error message.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.ADO.execSQL( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.ADO.execSQL( paramsObject );


Notes:

With ADO.execSQL you can actually execute any SQL INSERT, DELETE or UPDATE statement and even stored procedures (parameters are not supported at this time). When you are using a client side database, changes to the data are visible immediately after the command completes. In some instances you may have to call ADO.refresh to see the changes.

                

Examples:

The following example inserts a record into a database table.

ssCore.ADO.execSQL({sql:"INSERT INTO Customers (FirstName,LastName) VALUES ('Bruce','Dickinson')"});