Executes a fully qualified raw SQL statement against the database depending on the
nDataMode. Can be used for any backend data command using either VFP syntax or SQLExec() style SQL commands and is meant to return a result set.
Record count or 0. Check
.lError for any hard errors.
Raw SQL command to be executed by the data engine. This can be any command the backend will understand. For VFP data this means any VFP command that can be macro'd. For SQL Server any Transact SQL command.
Optional - a cursor name for the resulting data set or data sets. If not specified
.cSqlCursor is used for the cursor name. If the cursor is open it will be overwritten.
Important: FoxPro mode (
nDataMode=1) ignores the
lcCursorparameter and needs to specify cursor output explicitly (via
INTO CURSORor other commands). If you're using SELECT statements here, you can probably use the
.Query()method instead which fixes up SQL SELECT commands.
You can pass multi-line SQL statements without ; at the end of each line and this method will flatten the SQL statement to a single line when executing against the FoxPro data engine. This is useful for creating SQL Commands as strings in
See also:Class wwBusinessObject
Comment or report problem with topic