Menu og html fra database
Hejsa...Jeg har en web side som skal hente data fra 2 tabeller i en access DB.
Jeg får dog en klassisk fejl med:
"Item cannot be found in the collection corresponding to the requested name or ordinal.
/ny/default.asp, line 71 "
Jeg kan ikke rigtigt se hvilken fejl jeg laver. Kan i evt. se det i følgende kode:
_---------------------------------------------
<!-- #include file="DBOpen.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Henrik Ehlers - Digital Designer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/hehlers.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #acbac0;
}
-->
</style></head>
<%
Query= " SELECT * from tbl_menu where menu_vis = true order by menu_txt "
Set ResMenu = Conn.Execute(Query)
Session.LCID = 1030
%>
<body leftmargin="0" topmargin="0">
<table width="730" height="530" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th background="image/bg_window.gif" scope="col"><table width="700" height="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr >
<th height="60" colspan="3" scope="col" background="image/top_bg.gif"> </th>
</tr>
<tr>
<th height="200" colspan="3" scope="col"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="200">
<param name="movie" value="work/movie_top.swf">
<param name="quality" value="high">
<embed src="work/movie_top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="200"></embed>
</object></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="140" height="240" valign="top" background="image/ehlers_bg.jpg" scope="col"> <div align="center">
<table width="140" border="0" cellspacing="2" cellpadding="2">
<%
If not ResMenu.EOF then
ResMenu.movefirst
while not ResMenu.eof
%>
<tr>
<th scope="col" align="left"><a href="default.asp?link=<%=resMenu("menu_txt")%>" class="menuTxt"><%=resMenu("menu_txt")%></a></th>
</tr>
<%
ResMenu.MoveNext
Wend
resMenu.Close
Set resMenu = Nothing
End If
'End if
%>
</table>
</div></th>
<th width="420" valign="top" background="image/ehlers_bg_dark.jpg" scope="col"><table width="320" height="240" border="0" align="right" cellpadding="2" cellspacing="2">
<%
link = request.Querystring("link")
if link = "" then
Query= " SELECT * from tbl_sider where side_navn ='" & Forside & "'"
ResSider = Conn.Execute(Query)
else
Query= " SELECT * from tbl_sider where side_navn ='" & link &"'"
ResSider = Conn.Execute(Query)
end if
%>
<tr>
<th valign="top" scope="col"><div align="left"><%=ResSider("sider_html")%></div></th>
</tr>
</table>
<div align="right"></div></th>
<th width="140" scope="col"> </th>
</tr>
</table></th>
</tr>
</table>
</body>
</html>
<!-- #include file="DBClose.asp" -->
