Creates an empty, disconnected Recordset.
object.CreateRecordset(ColumnInfos)
Attribute | Description |
---|---|
Name | Name of the column header. |
Type | Integer of the data type. |
Size | Integer of the width in characters, regardless of data type. |
Nullability | Boolean value. |
Scale (Optional) |
This optional attribute defines the scale for numeric fields. If this value is not specified, numeric values will be truncated to a scale of three. Precision is not affected, but the number of digits following the decimal point will be truncated to three. |
The set of column arrays is then grouped into an array, which defines the Recordset.
The server-side business object can populate the resulting Recordset with data from a non-OLE DB data provider, such as an operating system file containing stock quotes.
The following table lists the DataTypeEnum values supported by the CreateRecordset method. The number listed is the reference number used to define fields.
Each of the data types is either fixed length or variable length. Fixed-length types should be defined with a size of 1, because the size is predetermined and a size definition is still required. Variable-length data types allow a size from 1 to 32767.
For some of the variable data types, the type may be coerced to the type noted in the Substitution column. You won't see the substitutions until after the Recordset is created and filled. Then you can check for the actual data type, if necessary.
Length | Constant | Number | Substitution |
---|---|---|---|
Fixed | adTinyInt | 16 | |
Fixed | adSmallInt | 2 | |
Fixed | adInteger | 3 | |
Fixed | adBigInt | 20 | |
Fixed | adUnsignedTinyInt | 17 | |
Fixed | adUnsignedSmallInt | 18 | |
Fixed | adUnsignedInt | 19 | |
Fixed | adUnsignedBigInt | 21 | |
Fixed | adSingle | 4 | |
Fixed | adDouble | 5 | |
Fixed | adCurrency | 6 | |
Fixed | adDecimal | 14 | |
Fixed | adNumeric | 131 | |
Fixed | adBoolean | 11 | |
Fixed | adError | 10 | |
Fixed | adGuid | 72 | |
Fixed | adDate | 7 | |
Fixed | adDBDate | 133 | |
Fixed | adDBTime | 134 | |
Fixed | adDBTimestamp | 135 | 7 |
Variable | adBSTR | 8 | 130 |
Variable | adChar | 129 | 200 |
Variable | adVarChar | 200 | |
Variable | adLongVarChar | 201 | 200 |
Variable | adWChar | 130 | |
Variable | adVarWChar | 202 | 130 |
Variable | adLongVarWChar | 203 | 130 |
Variable | adBinary | 128 | |
Variable | adVarBinary | 204 | |
Variable | adLongVarBinary | 205 | 204 |
Visual Basic Example | VBScript Example
Applies To: DataControl Object (RDS) | DataFactory Object (RDSServer)