Hey mitbrugernavn,
Nu er jeg ikke så skilled til dette her, men jeg for fejlen:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'databasen'. Make sure it exists and that its name is spelled correctly.
/ud.asp, line 15
ud.asp ser sådan her ud:
<%
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("../db/db.mdb")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<%
strSQL = "SELECT DISTINCT menu,sub FROM databasen order by menu asc" 'her henter du kun 1 af hver hvor menu og sub er ens
set rs = conn.execute(strSQL)
if not rs.eof then
do
strSQL2 = "SELECT COUNT(*) as antal FROM databasen where menu = '"& rs("menu") & "' and sub = '"& rs("sub")& "'" 'her henter du antal hvor menu og sub er ens
set rs2 = conn.execute(strSQL2)
antal = rs2("antal")
set rs2 = nothing
if rs("menu") <> menu then
response.write "<br>" & rs("menu") & "<br>- " & rs("sub") & " - antal: " & antal & "<br>"
else
response.write "- " & rs("sub") & " - antal: " & antal & "<br>"
end if
menu = rs("menu")
antal2 = antal + antal2 'for at se om de er med alle sammen
rs.movenext
loop while not rs.eof
set rs = nothing
end if
response.write antal2
%>
</body>
</html>