Visual InterDev

                           

Creates a set of records that makes it easier to access data.

Remarks

The Recordset object makes it easier to manipulate data by using its properties, methods, and events. Data-bound objects, which can be created by design-time controls, are bound to the Recordset object. It is the Recordset object that controls the flow of data. Therefore, you must create a Recordset object before you create other script objects if you want to bind data.

At design time, you can use the Recordset design-time control to create a Recordset object. The Recordset control has property pages that make it easier to control the behavior of the Recordset object.

When you are using design-time controls, there are two ways to add a Recordset control to a page. You can:

  • Drag a Recordset control from the Toolbox's Design-Time Controls pane onto a page and then specify the data connection and other properties.

  • In the Project Explorer, drag a data command from the DataEnvironment node onto a page. The Recordset control's properties are automatically set to the DE object (DataEnvironment).

For detailed steps for both of these tasks, see Getting Records.

To move the cursor position within the recordset, call the methods move, moveFirst, movePrevious, moveNext, moveLast, moveAbsolute, getBookmark, setBookmark.

Use the BOF and EOF properties to verify if the current record location is valid.

To modify the recordset, call the methods updateRecord, cancelUpdate, addRecord, and deleteRecord.

To return the number of records in the recordset, call the getCount method.

When opening and closing a recordset, call the open, close, and isOpen methods.

The Recordset object has a child object named fields that is a fields collection. Use the fields object to return values and objects that are related to the Recordset object's fields.

For information on scripting and objects, see Scripting with Design-Time Controls and Script Objects.