Exporting Recordset to an HTML Table (Object Doesn't Support This Property or Method)
<p>I can't seem to figure out as to why I would be getting an error "Object Doesn't Support This Property or Method" As far as I am aware, I seem to be doing everything by the book.</p>

<p>Any help is greatly appreciated.</p>

<p>Thanks</p>

<pre><code>function test() {
    try {
        alert("running function test...")
        var cn      = new ActiveXObject("ADODB.Connection")
        var sql     = "SELECT * FROM tbl_rssims"
        var db      = "G:\\AS\\Asf\\ASF\\RSSIMS\\db\\rssims.mdb"
        cn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + db + "")

        rs = cn.Execute(sql);

                var trs = [ ];
                while ( ! rs.EOF )
                {
                    var tr = [ ];
                    for ( var td = 1; td &lt;= 2; ++td )
                    {
                        if ( ! rs.EOF ) 
                        {
                            var flds = [ ];
                            for ( var f = 0; f &lt; rs.fields.length; ++f )
                            {
                               flds.push( rs.fields(f).value );
                            }
                            trs.MoveNext();
                            tr.push( flds.join("&lt;br/&gt;") );

                        } else {
                            tr.push( "&amp;nbsp;" );
                        }
                    }
                    trs.push( "&lt;td&gt;" + tr.join("&lt;/td&gt;&lt;td&gt;") + "&lt;/td&gt;\n" );
                }

        rs.close
        cn.close

        var html = '&lt;!DOCTYPE html&gt;\n'
                         + "&lt;html&gt;&lt;body" +
             + '&lt;table style="border: none; table-layout: fixed; width: 100%; text-align: left;" cellpadding="0" cellspacing="0"&gt;\n'
                         + "&lt;tr&gt;" + trs.join("&lt;/tr&gt;&lt;tr&gt;") + "&lt;/tr&gt;"
                         + '&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;';
        window.open('','').document.write(html)

    }//end of try

    catch(e) {

        alert(e.description)

    }

}//end of function
</code></pre>
