Sending results row-by-row

The steps below describe the call sequence for sending a result set from scratch.

  1. Instantiate an IJagServerResults interface pointer.

  2. Call BeginResults, specifying the number of columns in the result set.

  3. For each column, call DescribeCol to describe the column number, column name, length of the column name, datatype, precision, and size of the column. If a column represents a cash value, call ColAttributes to set the “COLUMN_MONEY” attribute.

    This step and the next step may be combined; you can describe columns and bind them in the same loop.

  4. For each column, call BindCol, specifying the size and location of the variable where the column’s data value and length can be read.

  5. For each row, update the variables containing the column’s data value and length, then call SendData to send the row to the client.

  6. Call EndResults after all rows have been sent.