You are here: Reference > JavaScript > client-side > ActiveX > ADO > objects > recordset

recordset object

Browser support:
Represents a set of data from a data source object.
If you need more information about the recordset object, please visit the MSDN site here.

Syntax:

Properties that reference the object:
object.recordset
Related objects:
Related HTML objects:
Methods that return the object:
object.namedRecordset (recordName [, subChapter])
Related HTML objects:

Example HTML code 1:

This example illustrates the use of the recordset object:
Code
news.xml
<head>
    <script type="text/javascript">
        function OnNewsComplete () {
            var boundingObj = event.srcElement;

            var items = boundingObj.namedRecordset ("", "item");
            items.MoveFirst ();

            while (!items.EOF) {
                var title = items.Fields ("title").value;
                var link = items.Fields ("link").value;
                DisplayItem (title, link);
                items.MoveNext ();
            }
        }

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

External links:

User Contributed Comments

Post Content

Post Content