setDataSource Method

See Also            Applies To

Specifies the Recordset object that is used to bind data.

Syntax

object.setDataSource(objRS)

Parameters

object

A script object.

objRS

The Recordset to which the current object is bound.

Remarks

The Recordset object behaves as the data source when binding data. When using design-time controls, the Recordset object is specified by the Recordset property.

To bind the object to a database field, use the getDataField and setDataField methods.

Example

In the following line, setDataSource sets Recordset3 as the Recordset object that is bound to Listbox1.

Listbox1.setDataSource(Recordset3);