_IAPIEvents::onServerDocData

method onServerDocData.

This callback function will be sent to the client to deliver result of SQL query from ServerDoc application,

in the form of matrix of data values which can contain one or more columns depending on the SELECT statement.

 

long onServerDocData(
  long DataRows,
  long RowCount,
  long DataSize
);

Parameters

DataRows

[in] .   Pointer to the chunk of formated CSV data values which are separated with tabulation and linefeed (LF).

         (when rogue linefeed (LF) characters appear into data, they will be replaced with char code 160)

 

          Note that in the case where the chunk of data contains only values for one column, each value is separated

 with carriage return character (CR) and rogue linefeed (LF) characters will be replaced with char code (160)

 

         Code in C/C++ can directly cast this pointer to (char*) type to get data.

Another way consists of using ConvertStringToBSTR( ) method to get BSTR string.

 

If DataRows is equals 0, this means the server acknownledged the SQLite DML commands (INSERT, UPDATE…)

RowCount

[in] .   Number of data rows (Maximum is equal to 100).

If 0 this means the end of recordset or the cancelling request is sent and received.

DataSize

[in] .   Amount of bytes.

Return Values

0

The client code will free the chunk of data (DataRows) with FreeString() on its own.

Negative value

The client code let the component to free the chunk of data after returning from this method.

 

See Also

_IAPIEvents