3. The XBSQLInsert class
The XBSQLInsert class represents an instance of a parsed and
checked SQL insert query. An instance is executed using the
execute method, after which results can be retrieved.
- bool XBSQLInsert::execute (int, XBSQLValue *)
This method executes the query. The arguments are, respectively,
the number and set of values to be substituted into any ?
placeholders in the parsed SQL. Note that the query may be
executed multiple times. In the event of an error, the error
message can be retrieved from the parent
XBaseSQL object.
- int XBSQLInsert::getNumRows ()
Returns the number of rows affected on the last execution of the
query. This should always be equal to one for a query that
executed successfully, except for insert .... select ....
queries, where the result will be non-negative.