Description
| Attaches the data of an ADODB recordset to a conversation handle, so the model can analyse it. The recordset is serialised at the moment of the call — a snapshot, independent of the cursor position and of the query that produced it. The cursor of the macro's own recordset is left untouched.
Call this before Ask, on a handle from NewConversation. The return value is True on success, or False on a validation error.
At most one recordset may be attached per handle. A second call on the same handle fails with aiErrInvalidRequest. A handle may carry both files and one recordset at the same time.
Parameter
| Description
| Handle
| Long, a handle created with NewConversation.
| rs
| Object, an open ADODB recordset.
| Caption
| String, optional. A short description of the dataset.
| Scope
| AIRecordsetScope, optional. Selects which rows are sent:
Constant
| Value
| Meaning
|
|---|
aiRsCurrentRow
| 0
| Only the current record.
| aiRsAllRows
| 1
| All rows, up to MaxRows. Default.
|
| MaxRows
| Long, optional. Maximum number of rows to send. Default 1000. Serialisation also stops earlier if an internal size limit is reached; in that case the dataset is marked as truncated.
| Columns
| Variant, optional. An array of column names to send. When omitted, all columns are sent (binary columns excluded). When supplied, only the named columns are sent, in the given order. An unknown column name fails the call with aiErrInvalidRequest. Use Array("Col1", "Col2") to build the value.
|
Note. The Columns argument is a projection for analysis, not a filter. It selects which columns the model sees; it does not select which rows are sent. To restrict rows, filter the recordset (or its query) before attaching it.
|
|