|
Having some trouble with a asp database navigation keep getting this error message:
Microsoft VBScript runtime error '800a01a8'
Object required: '1'
/navigation2.asp, line 65
Line 65 is in bold and underlined
Data base file is in a include:
<% Set dbConn = Server.CreateObject("ADODB.Connection") dbPath = Server.MapPath("nav.mdb") dbConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & dbPath & ";" %>
This is where the code starts
<% 'Dimension variables Dim strCategory 'Gets Category Heading Dim strCatRs 'Opens Category Recordset Dim strSubRs 'Opens Submenus Recordset Dim strCat_ID 'Holds Category ID 'Opens Category Recordset set strCatRs = Server.CreateObject("ADODB.Recordset") strCatRs.Open "Select * from tblNavCategory " , dbConn,1,3 'Category Id strCat_ID = strCatRs.Fields("Cat_ID").Value
'Opens Submenus Recordset set strSubRs = server.CreateObject("ADODB.Recordset")
Do Until strCatRs.EOF strCatRs.MoveNext Loop 'Gets The Category ID If strCat_ID.EOF = True Then Response.write "Cat_ID Field Is Empty Please Check Your Database And Try Again" Else End If %> <div align="left"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="171" height="17" id="AutoNumber1"> <tr> <td width="172" height="22" background="/Forum/forum_images/table_bg_image.gif" style="border-left: 1px solid #999999; border-right: 1px solid #999999; border-top: 1px solid #999999; border-bottom-color: #999999; border-bottom-width: 1"> <p align="center"> <font style="font-size: 11px; font-weight: 700" face="Tahoma" color="#FFFFFF"> Navigation</font></td> </tr> <tr> <td width="172" height="20" style="border-left: 1px solid #999999; border-right: 1px solid #999999; border-top-color: #999999; border-top-width: 1; border-bottom-color: #999999; border-bottom-width: 1" background="../../forum_images/white_tb.gif"> <font style="font-size: 11px; font-weight: 700" face="Tahoma"> <% 'Category Heading 'Category = strCatRs("NavCategory") Response.write(strCatRs("NavCategory")) 'Outputs Category Heading %> </font></td> </tr> <tr> <% strSubRs.Open "Select * from " & " tblNavSubCat" & " Where Cat_ID=" & " Cat_ID" & " Order By Sub_Title", dbConn,1,3 Do while not strSubRs.EOF strSubRs.MoveNext Loop %> <tr> <td width="172" height="15" valign="top" style="border-left: 1px solid #999999; border-right: 1px solid #999999; border-top-width: 1; border-bottom-width: 1"> <font style="font-size: 11px" face="Tahoma"> <a style="text-decoration: none" href="<% = strSubRs("Sub_URL")%>"><font color="#000000"><% = strSubRs("Sub_Title")%></font></a></font></td> </tr> <tr> <% 'Loop Categorys Do Until strCatRs.EOF strCatRs.MoveNext Loop
strCatRs.Close Set strCatRs = nothing
'Loop Sub Menus
Do Until strSubRs.EOF strSubRs.MoveNext Loop %>
<td width="172" height="15" valign="top" style="border:1px solid #999999; "> <p align="center"><font face="Tahoma" style="font-size: 1pt"> </font><font face="Tahoma" style="font-size: 7pt"><br> Powered by <a href=" http://www.bibsta.co.uk%22/ - Bibsta
|