1conair
April 23rd, 2001, 12:50 PM
I am developing an ASP page and using a Recordset to display some information. When I put this in I am getting this error "Error 80020009. Exception occurred." Anyone know what is causing this or what I can do to fix this? Below is my code
<%@ Language=VBScript %>
<% ' VI 6.0 Scripting Object Model Enabled %>
<!--#include file="_ScriptLibrary/pm.asp"-->
<% if StartPageProcessing() Then Response.End() %>
<FORM name=thisForm METHOD=post>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="STYLESHEET" href="Stylesheets/StateU1.css">
</HEAD>
<BODY>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT id=Recordset1 style="LEFT: 0px; TOP: 0px"
classid=clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0><PARAM NAME="ExtentX" VALUE="12197"><PARAM NAME="ExtentY" VALUE="2090"><PARAM NAME="State" VALUE="(TCConn=\qStateU\q,TCDBObject=\qDE\sCommands\q,TCD BObjectName=\qclasslist\q,TCControlID_Unmatched=\q Recordset1\q,TCPPConn=\qStateU\q,RCDBObject=\qRCDB Object\q,TCPPDBObject=\ qDE\sCommands\q,TCPPDBObjectName=\qclasslist\q,TCC ursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatc hed=\q100\q,TCCommTimeout_Unmatched=\q30\q,CCPrepa red=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,T CODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q, TCHTargetBrowser_Unmatched=\qS erver\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\sp age\q,RCCache=\qRCBookPage\q,CCOpen=1,GCParameters =(Rows=0))">
</OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Recordset.ASP"-->
<SCRIPT LANGUAGE="JavaScript" RUNAT="server">
function _initRecordset1()
{
thisPage.createDE();
var rsTmp = DE.Recordsets('classlist');
Recordset1.setRecordSource(rsTmp);
Recordset1.open();
if (thisPage.getState('pb_Recordset1') != null)
Recordset1.setBookmark(thisPage.getState('pb_Recor dset1'));
}
function _Recordset1_ctor()
{
CreateRecordset('Recordset1', _initRecordset1, null);
}
function _Recordset1_dtor()
{
Recordset1._preserveState();
thisPage.setState('pb_Recordset1', Recordset1.getBookmark());
}
</SCRIPT>
<!--METADATA TYPE="DesignerControl" endspan-->
<H1>Class List</H1>
<H3>Classes available at State University</H3>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT id=Grid1 style="LEFT: 0px; TOP: 0px"
classid=clsid:277FC3F2-E90F-11D0-B767-0000F81E081D><PARAM NAME="_ExtentX" VALUE="8043"><PARAM NAME="_ExtentY" VALUE="3889"><PARAM NAME="DataConnection" VALUE=""><PARAM NAME="SourceType" VALUE=""><PARAM NAME="Recordset" VALUE="Recordset1"><PARAM NAME="CtrlName" VALUE="Grid1"><PARAM NAME="UseAdvancedOnly" VALUE="0"><PARAM NAME="AdvAddToStyles" VALUE="-1"><PARAM NAME="AdvTableTag" VALUE=""><PARAM NAME="AdvHeaderRowTag" VALUE=""><PARAM NAME="AdvHeaderCellTag" VALUE=""><PARAM NAME="AdvDetailRowTag" VALUE=""><PARAM NAME="AdvDetailCellTag" VALUE=""><PARAM NAME="ScriptLanguage" VALUE="1"><PARAM NAME="ScriptingPlatform" VALUE="0"><PARAM NAME="EnableRowNav" VALUE="0"><PARAM NAME="HiliteColor" VALUE=""><PARAM NAME="RecNavBarHasNextButton" VALUE="-1"><PARAM NAME="RecNavBarHasPrevButton" VALUE="-1"><PARAM NAME="RecNavBarNextText" VALUE=" > "><PARAM NAME="RecNavBarPrevText" VALUE=" < "><PARAM NAME="ColumnsNames" VALUE='"ClassID","Title","Description"'><PARAM NAME="columnIndex" VALUE="0,1,2"><PARAM NAME="displayWidth" VALUE="68,68,68"><PARAM NAME="Coltype" VALUE="1,1,1"><PARAM NAME="formated" VALUE="0,0,0"><PARAM NAME="DisplayName" VALUE='"Number","Title","Major"'><PARAM NAME="DetailAlignment" VALUE=",,"><PARAM NAME="HeaderAlignment" VALUE=",,"><PARAM NAME="DetailBackColor" VALUE=",,"><PARAM NAME="HeaderBackColor" VALUE=",,"><PARAM NAME="HeaderFont" VALUE=",,"><PARAM NAME="HeaderFontColor" VALUE=",,"><PARAM NAME="HeaderFontSize" VALUE=",,"><PARAM NAME="HeaderFontStyle" VALUE=",,"><PARAM NAME="DetailFont" VALUE=",,"><PARAM NAME="DetailFontColor" VALUE=",,"><PARAM NAME="DetailFontSize" VALUE=",,"><PARAM NAME="DetailFontStyle" VALUE=",,"><PARAM NAME="ColumnCount" VALUE="3"><PARAM NAME="CurStyle" VALUE="Basic Navy"><PARAM NAME="TitleFont" VALUE="Arial"><PARAM NAME="titleFontSize" VALUE="4"><PARAM NAME="TitleFontColor" VALUE="16777215"><PARAM NAME="TitleBackColor" VALUE="13416"><PARAM NAME="TitleFontStyle" VALUE="1"><PARAM NAME="TitleAlignment" VALUE="0"><PARAM NAME="RowFont" VALUE="Arial"><PARAM NAME="RowFontColor" VALUE="0"><PARAM NAME="RowFontStyle" VALUE="0"><PARAM NAME="RowFontSize" VALUE="2"><PARAM NAME="RowBackColor" VALUE="16777215"><PARAM NAME="RowAlignment" VALUE="0"><PARAM NAME="HighlightColor3D" VALUE="268435455"><PARAM NAME="ShadowColor3D" VALUE="268435455"><PARAM NAME="PageSize" VALUE="10"><PARAM NAME="MoveFirstCaption" VALUE=" |< "><PARAM NAME="MoveLastCaption" VALUE=" >| "><PARAM NAME="MovePrevCaption" VALUE=" << "><PARAM NAME="MoveNextCaption" VALUE=" >> "><PARAM NAME="BorderSize" VALUE="1"><PARAM NAME="BorderColor" VALUE="13421772"><PARAM NAME="GridBackColor" VALUE="8421504"><PARAM NAME="AltRowBckgnd" VALUE="12632256"><PARAM NAME="CellSpacing" VALUE="0"><PARAM NAME="WidthSelectionMode" VALUE="2"><PARAM NAME="GridWidth" VALUE="90"><PARAM NAME="EnablePaging" VALUE="-1"><PARAM NAME="ShowStatus" VALUE="-1"><PARAM NAME="StyleValue" VALUE="453613"><PARAM NAME="LocalPath" VALUE="">
</OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Button.ASP"-->
<!--#INCLUDE FILE="_ScriptLibrary/RSNavBar.ASP"-->
<!--#INCLUDE FILE="_ScriptLibrary/DataGrid.ASP"-->
<SCRIPT LANGUAGE=JavaScript RUNAT=Server>
function _initGrid1()
{
Grid1.pageSize = 10;
Grid1.setDataSource(Recordset1);
Grid1.tableAttributes = ' cellpadding=2 cellspacing=0 bordercolor=#cccccc bgcolor=Gray border=1 cols=3 rules=ALL WIDTH=90%';
Grid1.headerAttributes = ' bgcolor=#003468 align=Left';
Grid1.headerWidth[0] = ' WIDTH=22%';
Grid1.headerWidth[1] = ' WIDTH=22%';
Grid1.headerWidth[2] = ' WIDTH=22%';
Grid1.headerFormat = '<Font face="Arial" size=4 color=White> <b>';
Grid1.colHeader[0] = '\'Number\'';
Grid1.colHeader[1] = '\'Title\'';
Grid1.colHeader[2] = '\'Major\'';
Grid1.rowAttributes[0] = ' bgcolor = White align=Left bordercolor=#cccccc';
Grid1.rowAttributes[1] = ' bgcolor = Silver align=Left bordercolor=#cccccc';
Grid1.rowFormat[0] = ' <Font face="Arial" size=2 color=Black >';
Grid1.colAttributes[0] = ' WIDTH=22%';
Grid1.colFormat[0] = '<Font Size=2 Face="Arial" Color=Black >';
Grid1.colData[0] = 'Recordset1.fields.getValue(\'ClassID\')';
Grid1.colAttributes[1] = ' WIDTH=22%';
Grid1.colFormat[1] = '<Font Size=2 Face="Arial" Color=Black >';
Grid1.colData[1] = 'Recordset1.fields.getValue(\'Title\')';
Grid1.colAttributes[2] = ' WIDTH=22%';
Grid1.colFormat[2] = '<Font Size=2 Face="Arial" Color=Black >';
Grid1.colData[2] = 'Recordset1.fields.getValue(\'Description\')';
Grid1.navbarAlignment = 'Right';
var objPageNavbar = Grid1.showPageNavbar(170,1);
objPageNavbar.getButton(0).value = ' |< ';
objPageNavbar.getButton(1).value = ' << ';
objPageNavbar.getButton(2).value = ' >> ';
objPageNavbar.getButton(3).value = ' >| ';
Grid1.hasPageNumber = true;
}
function _Grid1_ctor()
{
CreateDataGrid('Grid1',_initGrid1);
}
</SCRIPT>
<% Grid1.display %>
<!--METADATA TYPE="DesignerControl" endspan-->
</BODY>
<% ' VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
</HTML>
<%@ Language=VBScript %>
<% ' VI 6.0 Scripting Object Model Enabled %>
<!--#include file="_ScriptLibrary/pm.asp"-->
<% if StartPageProcessing() Then Response.End() %>
<FORM name=thisForm METHOD=post>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="STYLESHEET" href="Stylesheets/StateU1.css">
</HEAD>
<BODY>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT id=Recordset1 style="LEFT: 0px; TOP: 0px"
classid=clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0><PARAM NAME="ExtentX" VALUE="12197"><PARAM NAME="ExtentY" VALUE="2090"><PARAM NAME="State" VALUE="(TCConn=\qStateU\q,TCDBObject=\qDE\sCommands\q,TCD BObjectName=\qclasslist\q,TCControlID_Unmatched=\q Recordset1\q,TCPPConn=\qStateU\q,RCDBObject=\qRCDB Object\q,TCPPDBObject=\ qDE\sCommands\q,TCPPDBObjectName=\qclasslist\q,TCC ursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatc hed=\q100\q,TCCommTimeout_Unmatched=\q30\q,CCPrepa red=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,T CODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q, TCHTargetBrowser_Unmatched=\qS erver\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\sp age\q,RCCache=\qRCBookPage\q,CCOpen=1,GCParameters =(Rows=0))">
</OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Recordset.ASP"-->
<SCRIPT LANGUAGE="JavaScript" RUNAT="server">
function _initRecordset1()
{
thisPage.createDE();
var rsTmp = DE.Recordsets('classlist');
Recordset1.setRecordSource(rsTmp);
Recordset1.open();
if (thisPage.getState('pb_Recordset1') != null)
Recordset1.setBookmark(thisPage.getState('pb_Recor dset1'));
}
function _Recordset1_ctor()
{
CreateRecordset('Recordset1', _initRecordset1, null);
}
function _Recordset1_dtor()
{
Recordset1._preserveState();
thisPage.setState('pb_Recordset1', Recordset1.getBookmark());
}
</SCRIPT>
<!--METADATA TYPE="DesignerControl" endspan-->
<H1>Class List</H1>
<H3>Classes available at State University</H3>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT id=Grid1 style="LEFT: 0px; TOP: 0px"
classid=clsid:277FC3F2-E90F-11D0-B767-0000F81E081D><PARAM NAME="_ExtentX" VALUE="8043"><PARAM NAME="_ExtentY" VALUE="3889"><PARAM NAME="DataConnection" VALUE=""><PARAM NAME="SourceType" VALUE=""><PARAM NAME="Recordset" VALUE="Recordset1"><PARAM NAME="CtrlName" VALUE="Grid1"><PARAM NAME="UseAdvancedOnly" VALUE="0"><PARAM NAME="AdvAddToStyles" VALUE="-1"><PARAM NAME="AdvTableTag" VALUE=""><PARAM NAME="AdvHeaderRowTag" VALUE=""><PARAM NAME="AdvHeaderCellTag" VALUE=""><PARAM NAME="AdvDetailRowTag" VALUE=""><PARAM NAME="AdvDetailCellTag" VALUE=""><PARAM NAME="ScriptLanguage" VALUE="1"><PARAM NAME="ScriptingPlatform" VALUE="0"><PARAM NAME="EnableRowNav" VALUE="0"><PARAM NAME="HiliteColor" VALUE=""><PARAM NAME="RecNavBarHasNextButton" VALUE="-1"><PARAM NAME="RecNavBarHasPrevButton" VALUE="-1"><PARAM NAME="RecNavBarNextText" VALUE=" > "><PARAM NAME="RecNavBarPrevText" VALUE=" < "><PARAM NAME="ColumnsNames" VALUE='"ClassID","Title","Description"'><PARAM NAME="columnIndex" VALUE="0,1,2"><PARAM NAME="displayWidth" VALUE="68,68,68"><PARAM NAME="Coltype" VALUE="1,1,1"><PARAM NAME="formated" VALUE="0,0,0"><PARAM NAME="DisplayName" VALUE='"Number","Title","Major"'><PARAM NAME="DetailAlignment" VALUE=",,"><PARAM NAME="HeaderAlignment" VALUE=",,"><PARAM NAME="DetailBackColor" VALUE=",,"><PARAM NAME="HeaderBackColor" VALUE=",,"><PARAM NAME="HeaderFont" VALUE=",,"><PARAM NAME="HeaderFontColor" VALUE=",,"><PARAM NAME="HeaderFontSize" VALUE=",,"><PARAM NAME="HeaderFontStyle" VALUE=",,"><PARAM NAME="DetailFont" VALUE=",,"><PARAM NAME="DetailFontColor" VALUE=",,"><PARAM NAME="DetailFontSize" VALUE=",,"><PARAM NAME="DetailFontStyle" VALUE=",,"><PARAM NAME="ColumnCount" VALUE="3"><PARAM NAME="CurStyle" VALUE="Basic Navy"><PARAM NAME="TitleFont" VALUE="Arial"><PARAM NAME="titleFontSize" VALUE="4"><PARAM NAME="TitleFontColor" VALUE="16777215"><PARAM NAME="TitleBackColor" VALUE="13416"><PARAM NAME="TitleFontStyle" VALUE="1"><PARAM NAME="TitleAlignment" VALUE="0"><PARAM NAME="RowFont" VALUE="Arial"><PARAM NAME="RowFontColor" VALUE="0"><PARAM NAME="RowFontStyle" VALUE="0"><PARAM NAME="RowFontSize" VALUE="2"><PARAM NAME="RowBackColor" VALUE="16777215"><PARAM NAME="RowAlignment" VALUE="0"><PARAM NAME="HighlightColor3D" VALUE="268435455"><PARAM NAME="ShadowColor3D" VALUE="268435455"><PARAM NAME="PageSize" VALUE="10"><PARAM NAME="MoveFirstCaption" VALUE=" |< "><PARAM NAME="MoveLastCaption" VALUE=" >| "><PARAM NAME="MovePrevCaption" VALUE=" << "><PARAM NAME="MoveNextCaption" VALUE=" >> "><PARAM NAME="BorderSize" VALUE="1"><PARAM NAME="BorderColor" VALUE="13421772"><PARAM NAME="GridBackColor" VALUE="8421504"><PARAM NAME="AltRowBckgnd" VALUE="12632256"><PARAM NAME="CellSpacing" VALUE="0"><PARAM NAME="WidthSelectionMode" VALUE="2"><PARAM NAME="GridWidth" VALUE="90"><PARAM NAME="EnablePaging" VALUE="-1"><PARAM NAME="ShowStatus" VALUE="-1"><PARAM NAME="StyleValue" VALUE="453613"><PARAM NAME="LocalPath" VALUE="">
</OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Button.ASP"-->
<!--#INCLUDE FILE="_ScriptLibrary/RSNavBar.ASP"-->
<!--#INCLUDE FILE="_ScriptLibrary/DataGrid.ASP"-->
<SCRIPT LANGUAGE=JavaScript RUNAT=Server>
function _initGrid1()
{
Grid1.pageSize = 10;
Grid1.setDataSource(Recordset1);
Grid1.tableAttributes = ' cellpadding=2 cellspacing=0 bordercolor=#cccccc bgcolor=Gray border=1 cols=3 rules=ALL WIDTH=90%';
Grid1.headerAttributes = ' bgcolor=#003468 align=Left';
Grid1.headerWidth[0] = ' WIDTH=22%';
Grid1.headerWidth[1] = ' WIDTH=22%';
Grid1.headerWidth[2] = ' WIDTH=22%';
Grid1.headerFormat = '<Font face="Arial" size=4 color=White> <b>';
Grid1.colHeader[0] = '\'Number\'';
Grid1.colHeader[1] = '\'Title\'';
Grid1.colHeader[2] = '\'Major\'';
Grid1.rowAttributes[0] = ' bgcolor = White align=Left bordercolor=#cccccc';
Grid1.rowAttributes[1] = ' bgcolor = Silver align=Left bordercolor=#cccccc';
Grid1.rowFormat[0] = ' <Font face="Arial" size=2 color=Black >';
Grid1.colAttributes[0] = ' WIDTH=22%';
Grid1.colFormat[0] = '<Font Size=2 Face="Arial" Color=Black >';
Grid1.colData[0] = 'Recordset1.fields.getValue(\'ClassID\')';
Grid1.colAttributes[1] = ' WIDTH=22%';
Grid1.colFormat[1] = '<Font Size=2 Face="Arial" Color=Black >';
Grid1.colData[1] = 'Recordset1.fields.getValue(\'Title\')';
Grid1.colAttributes[2] = ' WIDTH=22%';
Grid1.colFormat[2] = '<Font Size=2 Face="Arial" Color=Black >';
Grid1.colData[2] = 'Recordset1.fields.getValue(\'Description\')';
Grid1.navbarAlignment = 'Right';
var objPageNavbar = Grid1.showPageNavbar(170,1);
objPageNavbar.getButton(0).value = ' |< ';
objPageNavbar.getButton(1).value = ' << ';
objPageNavbar.getButton(2).value = ' >> ';
objPageNavbar.getButton(3).value = ' >| ';
Grid1.hasPageNumber = true;
}
function _Grid1_ctor()
{
CreateDataGrid('Grid1',_initGrid1);
}
</SCRIPT>
<% Grid1.display %>
<!--METADATA TYPE="DesignerControl" endspan-->
</BODY>
<% ' VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
</HTML>