Runs a SQL statement specified in cSQL or passed in as a parameter. This method returns the SQL error code, as well as error information in cErrorMsg, cErrorMsg2 and aErrors. Any connection errors are retried several times.
loSql = CREATEOBJECT("wwSQL") loSQL.Connect("server=.;database=webstore;integrated security=true") lnCount = loSql.Execute("select * from wws_items","TQuery") IF (lnCount < 0) ? "Error: " + loSql.cErrorMsg RETURN ENDIF browse nowait && Tquery
SQL Result 0 - Still Pending 1 - OK -1 - Error. Check cErrorMsg and aErrors for full error info.
Optional - SQL statement to execute
Name of the cursor to output results to. If not provided the cSqlCursor property is used.
The cSqlCursor property is returned to TSQLQuery after each call to Execute.
For wwAdoSql ExecuteNonQuery is required for calling Stored Procedures that don't return cursors and have OUT parameters. If you use Execute instead of ExecuteNonQuery() the OUT parameter will not be returned.
See also:Class wwsql
Comment or report problem with topic