SQL_FetchString

Last Updated2007-06-01
Created At2007-06-01

Fetches a string from a field in the current row of a result set. If the result is NULL, an empty string will be returned. A NULL check can be done with the result parameter, or SQL_IsFieldNull().

native int SQL_FetchString(Handle query, int field, char[] buffer, int maxlength, DBResult& result = DBVal_Error)

Parameters

Handle query
A query (or statement) Handle.
int field
The field index (starting from 0).
char[] buffer
String buffer.
int maxlength
Maximum size of the string buffer.
DBResult& result
Optional variable to store the status of the return value.

Return Value

int Number of bytes written.

Error

Invalid query Handle or field index, invalid type conversion requested from the database, or no current result set.