DBResultSet Class

Represents a set of results returned from executing a query.

Methods 10

Name Description
FetchFloat

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

FetchInt

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

FetchMoreResults

Advances to the next set of results.

FetchRow

Fetches a row from the current result set. This must be successfully called before any results are fetched.

FetchSize

Returns the length of a field's data in the current row of a result set. This only needs to be called for strings to determine how many bytes to use. Note that the return value does not include the null terminator.

FetchString

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().

FieldNameToNum

Retrieves a field index by name.

FieldNumToName

Retrieves the name of a field by index.

IsFieldNull

Returns whether a field's data in the current row of a result set is NULL or not. NULL is an SQL type which means "no data."

Rewind

Rewinds a result set back to the first result.

Properties 6

Name Type Description
HasResultsbool

Returns whether or not a result set exists. This will return true even if 0 results were returned, but false on queries like UPDATE, INSERT, or DELETE.

RowCountint

Retrieves the number of rows in the last result set.

FieldCountint

Retrieves the number of fields in the last result set.

AffectedRowsint

Returns the number of affected rows from the query that generated this result set.

InsertIdint

Returns the insert id from the query that generated this result set.

MoreRowsbool

Returns if there are more rows.