You are here: Reference > JavaScript > client-side > ActiveX > ADO > properties > recordset (event, object, xml)

recordset property (event, object, xml)

Browser support:
Sets or retrieves a reference to the default record set in a data source.
To get a named record set, use the namedRecordset method.


You can find the related objects in the Supported by objects section below.
This property is read/write.

Possible values:

Reference to a recordset object that represents the default record set.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the recordset property:
    <script type="text/javascript">
        function OnNewsComplete () {
            var item = event.recordset.Fields("item").value;
            var title = item.Fields ("title").value;
            var link = item.Fields ("link").value;
            DisplayItem (title, link);

        function DisplayItem (title, link) {
            var htmlcode = '<i><a href="'+link+'" target="_blank">'+title+'</a><br /></i>';
            document.getElementById ('news').innerHTML += htmlcode;
    <xml src="news.xml" ondatasetcomplete="OnNewsComplete ();"></xml>
    <div id="news"></div>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content