dbGetResult()
Returns all results of an SQL query.
Synopsis
int dbGetResult(dbRecordset recordset, dyn_dyn_anytype &result, dyn_string &colNames[, int maxRows]);
Parameters
Parameter | Meaning |
---|---|
recordset | Record set reference. |
result | All results of an SQL query as a matrix with 2 columns and n rows. |
colNames | Column names. |
maxRows | Optional. Maximum number of rows to be returned. |
Return Value
The return value is an error code; 0 indicates the operation has been performed successfully. For other values dbGetError() can be used to obtain detailed error information.
Errors
An error is returned if an invalid record set reference variable is passed, or if changes to the record set are still waiting to be made.
Description
Returns all results of an SQL query. NULL values in the database (value not known) are returned as an empty string. Unknown data types are returned as string "N/A" ("not available").
Example
See dbBulkCommand().
Assignment
ADO and Qt, Database functions
Availability
CTRL