CreateRecordset Method (RDS)
Creates an empty, disconnected Recordset.
Beginning with Windows 8 and Windows Server 2012, RDS server components are no longer included in the Windows operating system (see Windows 8 and Windows Server 2012 Compatibility Cookbook for more detail). RDS client components will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Applications that use RDS should migrate to WCF Data Service.
A Variant array of attributes that defines each column in the Recordset created. Each column definition contains an array of four required attributes and one optional attribute.
Name of the column header.
Integer of the data type.
Integer of the width in characters, regardless of data type.
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 can be coerced to the type noted in the Substitution column. You will not see the substitutions until after the Recordset is created and filled. Then you can check for the actual data type, if necessary.