[script language = jscript runat = server>] /*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--* * FUNCTION: fnSimpleDisplayRecordset() * DESCRIPTION: This function displays the contents of a ADO recordset on a blank web page. Unlike the function fnDisplayRecordset() this function cannot make the values of a particular column/ field into hyperlinks. * STATUS: working, tested 10% * DOCUMENTED AT: http://www.geocities.com/matth3wbishop/eg/asp/ * CODE LOCATION: http://www.geocities.com/matth3wbishop/eg/asp/fnSimpleDisplayRecordset.txt * SEE ALSO: fnDisplayRecord(), fnDisplayRecordset(), fnDbugRecordset(), fnDbugRecord()(?), fnSimpleUpdateRecord() *--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*/ function fnSimpleDisplayRecordset(adoRs) { var sOutput = new String(""); var iRowCounter; var sTemp; if (adoRs == null) { fnErrorMessage( "fnSimpleDisplayRecordset", "adoRs", "A required parameter was omitted
"); } /* if adoRS is null */ adoRs.MoveFirst(); /* try, catch */ sOutput += "\n"; sOutput += "\n"; sOutput += " \n"; for (var ii = 0; ii < adoRs.Fields.Count; ii++) { sOutput += " \n"; } /* for */ sOutput += "\n"; iRowCounter = 1; while (!adoRs.EOF) { sOutput += "\n"; sOutput += " \n"; for (var ii = 0; ii < adoRs.Fields.Count; ii++) { sTemp = Server.HTMLEncode(adoRs.Fields.Item(ii).Value); sOutput += " \n"; } /* for */ sOutput += "\n"; adoRs.Movenext(); iRowCounter++; } /* while not eof */ sOutput += "
Row Number" + Server.HTMLEncode(adoRs.Fields.Item(ii).Name) + "
" + iRowCounter + "" + sTemp + "\n" + "
"; Response.Write(sOutput); } /* fnSimpleDisplayRecordset */ [/script]