Problemer med kode
Hej.Jeg er stået helt fast, nogen som kan hjælpe mig med at rette følgende kode til:
Kommer med følgende fejl:
Fejltype:
ADODB.Recordset (0x800A0E79)
Operation is not allowed when the object is open.
/auktion/liste1a.asp, line 200
<html> (linie 1)
<body bgcolor="#FFFFFF" text="#000000" background="/img/baggrund.gif" bgproperties="fixed">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<style type="text/css">
body{
font-family:"Arial";
background-color:"#8DB3C8";
}
#dhtmltooltip{
color:white;
position: absolute;
width: 150px;
border: 2px solid white;
padding: 2px;
background-color: lightyellow;
visibility: hidden;
z-index: 100;
/*Remove below line to remove shadow. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function showtip2(current,e,text){
if (document.all&&document.readyState=="complete"){
document.all.tooltip2.innerHTML='<table border="0" width="100%"><tr><td><font
color="white">'+text+'</font></td></tr></table>'
document.all.tooltip2.style.pixelLeft=event.clientX+document.body.scrollLeft+10
document.all.tooltip2.style.pixelTop=event.clientY+document.body.scrollTop+10
document.all.tooltip2.style.visibility="visible"
}
else if (document.layers){
document.tooltip2.document.nstip.document.write('<b>'+text+'</b>')
document.tooltip2.document.nstip.document.close()
document.tooltip2.document.nstip.left=0
currentscroll=setInterval("scrolltip()",100)
document.tooltip2.left=e.pageX+10
document.tooltip2.top=e.pageY+10
document.tooltip2.visibility="show"
}
}
function hidetip2(){
if (document.all)
document.all.tooltip2.style.visibility="hidden"
else if (document.layers){
clearInterval(currentscroll)
document.tooltip2.visibility="hidden"
}
}
// End -->
</script>
<div id="dhtmltooltip"></div>
<p>
<script type="text/javascript">
var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") :
""
function ietruebody(){
return (document.compatMode!="BackCompat")? document.documentElement : document.body
}
function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}
function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint :
window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint :
window.innerHeight-e.clientY-offsetypoint-20
var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" :
window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"
//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" :
window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}
function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
document.onmousemove=positiontip
</script>
<script type="text/javascript">
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
</script>
</p>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../db/auktion.mdb")
Conn.Open DSN
%>
<% set rskunder = Conn.execute("SELECT * FROM liste where id="& request("liste"))%>
<%Response.Write rskunder("beskrivelse")%>
<% rskunder.Close
set rskunder = Nothing %>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../db/auktion.mdb")
Conn.Open DSN
%>
<%
intPage = Request("page")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If
%>
<% set rs = Conn.execute("SELECT * FROM liste where id="& request("liste"))%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="63%" id="AutoNumber1">
<form action="liste1vis.asp" method="get">
<input type="hidden" name="id" value="<%Response.Write rs("id")%>">
<font size="2"> <br>
</font>
<tr>
<td>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="63%" id="AutoNumber1">
<font size="2"> <br>
</font>
<tr>
<td width="11%"><font face="Arial" size="2">Katalog nr.:</font></td>
<td width="49%"><font face="Arial" size="2">Beskrivelse</font></td>
<td width="19%"><font face="Arial" size="2">Billede</font></td>
<td width="21%"><font face="Arial" size="2">Forhåndsbud</font></td>
</tr>
</table>
<%
rs.Open strSQL, Conn, 1
If Not (rs.BOF Or rs.EOF) Then
rs.PageSize = 20
rs.AbsolutePage = intPage
intRecCount = rs.PageSize
intPageCount = rs.PageCount
%>
<% Do While Not rs.EOF And intRecCount > 0
%>
<table width="63%" border="1" >
<tr>
<font face="Arial">
<td width="10%" bgcolor="<%= farve %>">
<%Response.Write rs("katalognr")%>
<font face="Arial" size="2"> </font> </td>
<td width="50%" bgcolor="<%= farve %>"> <font face="Arial">
<%Response.Write rs("Beskrivelse")%>
<font face="Arial" size="2"> </font></font> </td>
<td width="20%" bgcolor="<%= farve %>"><font face="Arial" size="2"> <img src="../img/<%=rs("billede")%>" width="37" height="39" onMouseover="ddrivetip('<img src=../img/<%=rs("billede")%>>');"onMouseout="hideddrivetip();"> </a>
</font></td>
<td width="20%" bgcolor="<%= farve %>">
<%Response.Write rs("bud")%>
<font face="Arial" size="2">  KR.</font></td>
<td width="7%"><input type="submit" value="Byd"></td>
</font>
</form>
</table>
<%
'Trækker den næste record ud og lukker din forbindelse
intRecCount = intRecCount - 1
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Response.Write "Du er på side:"
Response.Write intPage
Response.Write " -Vælg næste katalog side "
'Paging scriptet
For intNum = 1 To intPageCount
Response.Write "<a href='liste1.asp?id=1&fid=" & "&page=" & intNum & "'>" & intNum & "</a> "
next
end if
%>
</body>
</html>
