I wonder if anybody can help me with the problem showed below.
When I click on a "link" so I can Edit I get this message
The Code wil be below..
line 21 "editdata.asp" --> form_ArtNr=rstemp("ArtNr"
*********************************************************
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/Project1_Local/ddag/editdata.asp, line 21
********************************************************
------------------visdata.asp---------------------- <%@Language=VBScript %>
<%
Response.buffer=true
Response.ExpiresAbsolute=Now() - 1
Response.Addheader "Cache-Control", "private"
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
myname=Request.Form("KundeNr"
dbname="/Project1_Local/MPS2000/mps2000-Da.mdb"
myconnect="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
myconnect=myconnect & server.MapPath(dbname) & ";"
sqltemp="SELECT ArtNr AS ArtNr , OrdreNr AS Orders, Bygg AS Ref , ArtTekst AS ArtText , Ant AS Qty, Levert AS DQty ,Leveringstid AS DeliveryDate , Kommentar AS Comment FROM Purring where KundeNr='"
sqltemp=sqltemp & myname & "'"
IDfield="ArtNr"
scriptresponder="editdata.asp"
set conntemp=server.CreateObject("adodb.connection"
conntemp.Open myconnect
set rstemp=conntemp.Execute(sqltemp)
howmanyfields=rstemp.fields.count -1
%>
<P align=center><table border="1" style="FONT: 12px Width =100%" borderColor=white bgColor=silver align=center>
<TR>
<td valign="top">---</td>
<%'Heading
for i=0 to howmanyfields%>
<td><b><%=rstemp(i).name %></b></td>
<%next%>
</TR>
<%
do while not rstemp.eof %>
<tr><td valign="top">
<%my_link=scriptresponder & "?ArtNr=" & rstemp(IDfield)%>
<a href="<%=my_link%>">Edit</a></td>
<%for i =0 to howmanyfields%>
<td valign="top"><%=rstemp(i)%></td>
<%next%>
</tr>
<%
rstemp.movenext
loop
rstemp.close
set rstemp=nothing
conntemp.Close
set conntemp=nothing
%>
</table></P></STRONG>
</BODY>
</HTML>
*************editdata.asp**************
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<%
dbname="/Project1_Local/MPS2000/mps2000-Da.mdb"
myconnect="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
myconnect=myconnect & server.MapPath(dbname) & ";"
set conntemp=server.CreateObject("adodb.connection"
conntemp.Open myconnect
form_ID=Request.QueryString("ArtNr"
sqltemp="SELECT * from Purring "
sqltemp=sqltemp & "where ArtNr=" & form_ID
set rstemp=conntemp.Execute(sqltemp)
form_ArtNr=rstemp("ArtNr"
form_Leveringstid=rstemp("Leveringstid"
form_Kommentar=rstemp("Kommentar"
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
%>
<BODY>
<form name="edit" action="oppdaterdata.asp" method="POST">
<Input type="hidden" name="id" value="<%=form_ArtNr%>">
<p>ArtNr: <%form_ArtNr%></p>
<p>Delivery Date:
<input type="Text" name="Leveringstid" value="<%form_Leveringstid%>"></p>
<p>Comment:
<input type="Text" name="kommentar" value="<%form_Kommentar%>"></p>
<p> <input type="Submit"> </p>
</form>
</BODY>
</HTML>
When I click on a "link" so I can Edit I get this message
The Code wil be below..
line 21 "editdata.asp" --> form_ArtNr=rstemp("ArtNr"
*********************************************************
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/Project1_Local/ddag/editdata.asp, line 21
********************************************************
------------------visdata.asp---------------------- <%@Language=VBScript %>
<%
Response.buffer=true
Response.ExpiresAbsolute=Now() - 1
Response.Addheader "Cache-Control", "private"
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
myname=Request.Form("KundeNr"
dbname="/Project1_Local/MPS2000/mps2000-Da.mdb"
myconnect="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
myconnect=myconnect & server.MapPath(dbname) & ";"
sqltemp="SELECT ArtNr AS ArtNr , OrdreNr AS Orders, Bygg AS Ref , ArtTekst AS ArtText , Ant AS Qty, Levert AS DQty ,Leveringstid AS DeliveryDate , Kommentar AS Comment FROM Purring where KundeNr='"
sqltemp=sqltemp & myname & "'"
IDfield="ArtNr"
scriptresponder="editdata.asp"
set conntemp=server.CreateObject("adodb.connection"
conntemp.Open myconnect
set rstemp=conntemp.Execute(sqltemp)
howmanyfields=rstemp.fields.count -1
%>
<P align=center><table border="1" style="FONT: 12px Width =100%" borderColor=white bgColor=silver align=center>
<TR>
<td valign="top">---</td>
<%'Heading
for i=0 to howmanyfields%>
<td><b><%=rstemp(i).name %></b></td>
<%next%>
</TR>
<%
do while not rstemp.eof %>
<tr><td valign="top">
<%my_link=scriptresponder & "?ArtNr=" & rstemp(IDfield)%>
<a href="<%=my_link%>">Edit</a></td>
<%for i =0 to howmanyfields%>
<td valign="top"><%=rstemp(i)%></td>
<%next%>
</tr>
<%
rstemp.movenext
loop
rstemp.close
set rstemp=nothing
conntemp.Close
set conntemp=nothing
%>
</table></P></STRONG>
</BODY>
</HTML>
*************editdata.asp**************
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<%
dbname="/Project1_Local/MPS2000/mps2000-Da.mdb"
myconnect="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
myconnect=myconnect & server.MapPath(dbname) & ";"
set conntemp=server.CreateObject("adodb.connection"
conntemp.Open myconnect
form_ID=Request.QueryString("ArtNr"
sqltemp="SELECT * from Purring "
sqltemp=sqltemp & "where ArtNr=" & form_ID
set rstemp=conntemp.Execute(sqltemp)
form_ArtNr=rstemp("ArtNr"
form_Leveringstid=rstemp("Leveringstid"
form_Kommentar=rstemp("Kommentar"
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
%>
<BODY>
<form name="edit" action="oppdaterdata.asp" method="POST">
<Input type="hidden" name="id" value="<%=form_ArtNr%>">
<p>ArtNr: <%form_ArtNr%></p>
<p>Delivery Date:
<input type="Text" name="Leveringstid" value="<%form_Leveringstid%>"></p>
<p>Comment:
<input type="Text" name="kommentar" value="<%form_Kommentar%>"></p>
<p> <input type="Submit"> </p>
</form>
</BODY>
</HTML>