- DatabaseOpen
- DatabaseClose
- DatabaseImport
- DatabaseExport
- DatabasePrint
- DatabaseTableExists
- DatabaseExecute
- DatabasePrepare
- DatabaseReset
- DatabaseBind
- DatabaseBindArray
- DatabaseRead
- DatabaseReadBind
- DatabaseFinalize
- DatabaseTransactionBegin
- DatabaseTransactionCommit
- DatabaseTransactionRollback
- DatabaseColumnsCount
- DatabaseColumnName
- DatabaseColumnType
- DatabaseColumnSize
- DatabaseColumnText
- DatabaseColumnInteger
- DatabaseColumnLong
- DatabaseColumnDouble
- DatabaseColumnBlob
DatabaseReadBind
Moves to the next record and reads data into the structure from it.
bool DatabaseReadBind(
|
Parameters
request
[in] The handle of a request created in DatabasePrepare().
struct_object
[out] The reference to the structure the data from the current record is to be read to. The structure should only have numerical types and/or strings (arrays are not allowed) as members and cannot be a descendant.
Return Value
Return true if successful, otherwise false. To get the error code, use GetLastError(), the possible responses are:
- ERR_INVALID_PARAMETER (4003) – no table name specified (empty string or NULL);
- ERR_WRONG_STRING_PARAMETER (5040) – error converting a request into a UTF-8 string;
- ERR_DATABASE_INTERNAL (5120) – internal database error;
- ERR_DATABASE_INVALID_HANDLE (5121) – invalid database handle;
- ERR_DATABASE_EXECUTE (5124) – request execution error;
- ERR_DATABASE_NO_MORE_DATA (5126) – no table exists (not an error, normal completion).
Note
A number of fields in the struct_object structure should not exceed DatabaseColumnsCount(). If the number of fields in the struct_object structure is less than the number of fields in the record, the partial reading is performed. The remaining data can be explicitly obtained using the corresponding DatabaseColumnText(), DatabaseColumnInteger() and other functions.
Example:
struct Person
|
See also