Move the cursor to the next row in the result set. Note that you must call this function before retrieving column data. The initial position of the cursor is before the first row in the result set. If the result set is empty, this function will return MA_DB_NO_ROW.

Get the column value at the current row pointed to by the cursor as a text data buffer. Use this function for text data.

Parameters:

cursorHandle

Handle to the cursor.

columnIndex

Index of the column to retrieve value from. First column has index zero.

buffer

Pointer to buffer to receive the data. The result is NOT zero terminated.

bufferSize

Max size of the buffer.

Returns:

The actual length of the data, if the actual length returned is > bufferSize, data was not copied (buffer too small), returns MA_DB_ERROR on other errors, returns MA_DB_NULL if the column value is NULL.

The x and y coordinate of the top-left corner are defined by 'left' and 'top'. The dimensions of the rectangle are defined by 'width' and 'height'.

In MoSync Debug builds, when such an error occurs, the runtime writes an instance of this structure to a Store named "panic.report".

The length of that instance may be greater than sizeof(MAPanicReport), because of the variable-length string that may appear at its end. The member string can, then, be longer than the one byte that is declared.

To properly read an instance of this struct from a store, you should allocate a chunk of memory whose size is equal to the size of the store, then read the entire store into that chunk of memory. Then you should make a pointer of type MAPanicReport and point it to the chunk. Then you can read normally, using that pointer.