fejlmelding i asp
hej..jeg har et problem som følgene :
hvis jeg indsætte denne side på mit websted med koden...
--------------------------------------------------------
<!--#include file="data.asp" -->
<table valign=top width="810" cellspacing=0 cellpadding=0 border=0>
<tr>
<td class=BOXCOL2>
<%
antal_pics=5
ordrecount=connect.execute("SELECT count(tblannonce.id_annonce) AS antal FROM (tblannonce INNER JOIN tblannonce_banner ON tblannonce.id_annonce=tblannonce_banner.id_annonce) INNER JOIN tblannonce_type ON tblannonce.id_annoncetype=tblannonce_type.id_annoncetype WHERE tblannonce.id_bruger>0 AND tblannonce_banner.id_ordre>0")
antal_poster=ordrecount("antal")
if antal_poster<min_bannerpics then
antal_poster=min_bannerpics 'fastsat i global
end if
SQL="SELECT top "&antal_poster&" * FROM (tblannonce INNER JOIN tblannonce_banner ON tblannonce.id_annonce=tblannonce_banner.id_annonce) INNER JOIN tblannonce_type ON tblannonce.id_annoncetype=tblannonce_type.id_annoncetype ORDER BY tblannonce_banner.id_ordre desc"
Set RSpics = Server.CreateObject("ADODB.RecordSet")
RSpics.Open SQL, Connect, 3
bannercount=0
do while not bannercount=antal_pics and not rspics.recordcount=bannercount
RandNum = Int(Rnd * rspics.recordcount) + 1
rspics.absoluteposition = RandNum
brugnummer=true
pics=split(checkbil,",")
for each objekt in pics
if lcase(objekt)=lcase(rspics("id_annonce")) then
brugnummer=false
end if
next
if brugnummer=true then
bannercount=bannercount+1
connect.execute("UPDATE tblordre SET tblordre.visninger=tblordre.visninger+1 WHERE tblordre.id_ordre="&rspics("id_ordre") )
checkbil=checkbil&rspics("id_annonce")&","
%>
<div align="center">
<table height=1 width="20%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#663300" bordercolordark="#FFFFFF"><tr class=boxcol><td width="71%">
<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td><p align="center"><a href=/banner01.asp?id=<%=rspics("id_annonce")%>&ido=<%=rspics("id_ordre")%>><img src=/banner/<%=rspics("id_banner")%>.jpg border=0></a></td></tr></table></td></tr>
<tr class=boxcol><td><font style="font-size:9px"><%=rspics("overskrift")%></font> </td></tr>
<tr class=headcol1><td width="71%" background="/grafik/tabletop_bg1.gif"><table width=100% cellspacing=0 cellpadding=0 border=0><tr><td style="font-size:9px;color:#000000;"><%=rspics("annoncetype")%></td><td style="font-size:9px;color:#000000;" align=right>Kr. <%=formatnumber(rspics("pris"))%></td></tr></table></td></tr>
</td></tr></table></div>
<%
if bannercount<antal_pics then
%>
</td>
<td class=BOXCOL2 width="20%">
<%
end if
end if
loop
rspics.close
set rspics=nothing
%>
</table>
--------------------------------------------------------
så kommer der en fejlmeddelse som denne :
objekt requied
annoncer05 line104
og denne side ser sådan ud...markeret på siden længere nede
--------------------------------------------------------
<!--#include file="../data.asp" -->
<%
mode=request("mode")
id=request("id_annonce")
if mode="slet" then
set billeder=connect.execute("SELECT * FROM tblannonce_pic WHERE pic=1 AND id_annonce="&id)
Set fs = CreateObject("Scripting.FileSystemObject")
do while not billeder.eof
fs.deletefile(server.mappath("\annoncer\annoncebilled\"&id&"_"&billeder("id_local")&".jpg"))
fs.deletefile(server.mappath("\annoncer\annoncebilled\"&id&"_"&billeder("id_local")&"_small.jpg"))
billeder.movenext
loop
set fs=nothing
connect.execute("DELETE * FROM tblannonce_pic WHERE id_annonce="&id)
connect.execute("DELETE * FROM tblannonce WHERE id_annonce="&id)
billeder.close
set billeder=nothing
close_db()
response.redirect ("annoncer01.asp")
end if
if mode="forlaeng" then
connect.execute("UPDATE tblannonce SET dato_udloeb=#"&datofix(date+30)&"# WHERE id_bruger="&session("chrbruger"))
close_db()
response.redirect ("annoncer01.asp?forlaeng=true")
end if
if mode="rediger" then
Set uplp = Server.CreateObject("Softartisans.FileUpProgress")
Dim ProgressID
ProgressID = uplp.NextProgressID
result=connect.execute("SELECT * FROM (tblannonce INNER JOIN tblunderkategori ON tblannonce.id_underkategori = tblunderkategori.id_underkategori) INNER JOIN tbloverkategori ON tblunderkategori.id_overkategori = tbloverkategori.id_overkategori WHERE id_annonce="&id)
set pics=connect.execute("SELECT * FROM tblannonce_pic WHERE pic=1 AND id_annonce="&id)
set overkategorier=connect.execute("SELECT * FROM tbloverkategori ORDER BY overkategori")
set underkategorier=connect.execute("SELECT * FROM tblunderkategori WHERE id_overkategori="&result("id_overkategori")&" ORDER BY underkategori")
set annoncetype=connect.execute("SELECT * FROM tblannonce_type ORDER BY id_annoncetype")%>
<!--#include file="../gribb02.asp"-->
<table width=100% border="0" cellspacing="0" cellpadding="0">
<form method=post name=mainform target=dataframe2 enctype="multipart/form-data" action="annoncer04.asp?progressid=<%=progressid%>&mode=opdater&id=<%=id%>">
<tr><td width="100%" class=headcol background="../grafik/prg004.gif" height="21"><b>Mine annoncer</b></td></tr> </table>
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" bordercolorlight="#663300" bordercolordark="#FFFFFF">
<tr class=boxcol><td width="100%"> <img src="../grafik/prg009.gif"> <b> <a href=annoncer01.asp>
<font color="#000000"><span style="text-decoration: none">Annonce oversigt</span></font></a></b></td></tr>
<tr class=boxcol align="center"><td><b>Rediger annoncen</b></td></tr>
<tr><td class=boxcol>
<table width="400" cellspacing="0" cellpaddding="0" border="0" align=center>
<tr class=headcol><td> Hovedkategori</td><td align="right">
<select style="width:275" class=input1 name=id_overkategori onchange="java script:hent_underkategori();">
<%do while not overkategorier.eof%>
<option value="<%=overkategorier("id_overkategori")%>" <%if result("id_overkategori")=overkategorier("id_overkategori") then%>SELECTED<%end if%>><%=overkategorier("overkategori")%></option>
<%overkategorier.movenext
loop%>
</select> </td></tr>
<tr class=headcol><td> Kategori</td><td align="right">
<select style="width:275" class=input1 name=id_underkategori>
<%do while not underkategorier.eof%>
<option value="<%=underkategorier("id_underkategori")%>" <%if underkategorier("id_underkategori")=result("id_underkategori") then%>SELECTED<%end if%>><%=underkategorier("underkategori")%></option>
<%underkategorier.movenext
loop%>
</select> </td></tr>
<tr class=headcol><td> Annoncetype</td><td align="right">
<select style="width:200" class=input1 name=id_annoncetype>
<%do while not annoncetype.eof%>
<option value="<%=annoncetype("id_annoncetype")%>" <%if result("id_annoncetype")=annoncetype("id_annoncetype") then%>SELECTED<%end if%>><%=annoncetype("annoncetype")%></option>
<%annoncetype.movenext
loop%>
</select> </td></tr>
<%formcount=formcount+1%>
<tr class=headcol><td> Overskrift</td><td align="right">
<input style="width:200" class=input1 type="text" name="overskrift" value="<%=result("overskrift")%>" maxlength="50" size="20"> </td></tr>
<tr class=headcol><td> Tekst</td><td align="right">
<textarea class=input1 name="tekst" style="width:200" rows="5" cols="20"><%=result("tekst")%></textarea> </td></tr>
<tr class=headcol><td> Prisen</td><td align="right">
<input style="width:200" class=input1 type="text" name="pris" value="<%=result("pris")%>" size="20"> </td></tr>
<tr class=headcol><td> Evt. Domænenavn</td><td align="right">
<input style="width:200" class=input1 type="text" name="tekst02" value="<%=result("tekst02")%>" maxlength="50" size="20"> </td></tr>
<tr class=headcol><td> Excl. Moms <input type="checkbox" name="moms" <%if result("moms")=1 then%>CHECKED<%end if%> value="1"></td><td align="right"> </td></tr>
<tr class=headcol><td> Billede 1 (jpeg)</td><td align="right">
<input style="width:200" class=input1 type="file" name="pic0" size="20"> </td></tr>
<tr class=headcol><td> Billede 2 (jpeg)</td><td align="right">
<input style="width:200" class=input1 type="file" name="pic1" size="20"> </td></tr>
<tr class=headcol><td> Billede 3 (jpeg)</td><td align="right">
<input style="width:200" class=input1 type="file" name="pic2" size="20"> </td></tr>
</form>
</table>
<br>
<div id=divprogress>
<table cellspacing=0 cellpadding=0 border=0 width=100%><tr><td align=right><a href="java script:check_post();">
<span style="text-decoration: none; font-weight: 700">
<font color="#000000">Gem ændringer</font></span></a> <img src="../grafik/prg008.gif"> </td></tr></table>
</div>
</td></tr>
<%if not pics.eof then%>****************************line 104
<tr class=boxcol><td><b>Billede</b></td></tr>
<tr class=boxcol><td align=center>
<table cellspacing=0 cellpadding=0 border=0><tr>
<%do while not pics.eof
count=count+1
if count>1 then%>
<%end if%>
<td width=100 align=center>Billede <%=pics("id_local")+1%><br><img src=/annoncer/annoncebilled/<%=pics("id_annonce")%>_<%=pics("id_local")%>_small.jpg border=0></td>
<%pics.movenext
loop
pics.close
set pics=nothing%>
</tr></table>
</td></tr>
<%else%>
<tr class=boxcol><td><font color="#000000"><b>Der er ikke gemt et billede</b></font></td></tr>
<%end if%>
</td></tr></table>
<script language="javascript">
<%if request("billedecheck")="fejl" then%>
alert("Et eller flere billeder kunne ikke gemmes. Check om filen er i formatet *.JPG")
<%end if%>
function go(formcount) {
document.forms[formcount].submit();
}
function check_post(){
if (document.mainform.id_underkategori.value<1)
alert("Der er ikke valgt en kategori.")
else if (document.mainform.overskrift.value=="")
alert("Der er ikke indtastet en overskrift.")
else if (document.mainform.tekst.value=="")
alert("Der er ikke indtastet en tekst.")
else if(isNaN(document.mainform.pris.value))
alert("Pris feltet må kun indeholde tal.")
else
{parent.dataframe.location="../progress01.asp?progressid=<%=ProgressID%>";
document.mainform.submit();}
}
function hent_underkategori() {
parent.dataframe.location="annoncer02.asp?mode=underkategori&id_overkategori="+document.mainform.id_overkategori.value;
}
</script>
<!--#include file="../gribb04.asp"-->
<%
overkategorier.close
set overkategorier=nothing
underkategorier.close
set underkategorier=nothing
annoncetype.close
set annoncetype=nothing
end if
close_db()
%>
--------------------------------------------------------
kan i se hvor fejlen ligger.?
er det den første side som ikke bliver lukket korrekt?
hvilken objekt er der tale om?
kan man evt lave en ny side som kan det samme som den øverste på en anden måde og hvordan??
kan du ellers skrive en mail på per@gribb.dk så kan jeg sende de forskellige sider til dig dette er nok mere overskuelig
--------------------------------------------------------