[script language = jscript runat = server]
/*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*
* FUNCTION: fnDbugRecordset()
* DESCRIPTION:
This function displays the contents of a ADO
recordset on a blank web page and terminates any
further output from the server.
This function is designed to be used for debugging
queries against databases.
* STATUS: working
* DOCUMENTED AT:
http://www.geocities.com/matth3wbishop/eg/asp/
* CODE LOCATION:
http://www.geocities.com/matth3wbishop/eg/asp/
*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*/
function fnDbugRecordset(adoRs)
{
var sOutput = new String("");
var iRowCounter;
//adoRs.GetRows();
//debug(
if (adoRs == null)
{
fnErrorMessage(
"fnDbugRecordset", "adoRs",
"A required parameter was omitted
");
} /* if adoRS is null */
if (typeof(adoRs) != "object")
{
fnErrorMessage(
"fnDbugRecordset", "adoRs",
"The parameter must be an ADO recordset object
");
} /* if adoRS not an object */
sOutput +=
"
| Row Number | \n"; for (var ii = 0; ii < adoRs.Fields.Count; ii++) { sOutput += "" + Server.HTMLEncode(adoRs.Fields.Item(ii).Name) + " | \n"; } /* for */ sOutput += "
| " + iRowCounter + " | \n"; for (var ii = 0; ii < adoRs.Fields.Count; ii++) { sOutput += "" + Server.HTMLEncode(adoRs.Fields.Item(ii).Value) + "\n" + " | \n"; } /* for */ sOutput += "