Without going deeply into you code sounds like you are using
a form value in
trying to query after the form has been processed. This won't
work as form
values only work once and will have been used up in the
original form
action.
--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"pqer" <webforumsuser@macromedia.com> wrote in message
news:eistn4$oat$1@forums.macromedia.com...
> I'm not understanding or seeing the problem, please
help. I'm still
> learning
> ASP so please explain your suggestion in detail.
>
> I have created an edited.asp that updates the database
with information
> pulled
> from a previous page. The database is updating, why am I
receiving the
> error
> message?
>
> Error Type:
> ADODB.Field (0x80020009)
> Either BOF or EOF is True, or the current record has
been deleted.
> Requested
> operation requires a current record.
> /impcustomers/edited.asp
>
>
>
> <%@LANGUAGE="VBSCRIPT"%>
> <% Option Explicit %>
> <%
> Dim strUserName
> Dim strPassword
> Dim intSLevel
> Dim strIdDet
> Dim objConn
> Dim objRS
> Dim SQL
> Dim idToEdit
>
> 'get pass parameters
> strUserName = Session("username")
> strPassword = Session("userpass")
> intSLevel = Session("sLevel")
> strIdDet = Request.Form("custID")
>
> 'check to see if idToEdit is blank
> idToEdit = Trim("" & Request("custID"))
> Response.Write "idToEdit is [" & idToEdit & "].
Is it blank? " &
> (idToEdit =
> "") & "<hr>"
> If idToEdit = "" Then
> Response.Write "No custID available for making SQL
query. Aborting."
> Response.End ' or redirect or or
>
> Else
>
> ' custID *was* passed in, so set or update session
variable
> Session("custID") = idToEdit
>
> ' open connection to the database
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=c:\Inetpub\db\IMPCustomers.mdb"
>
> ' set SQL statement
> SQL = "SELECT * FROM tblCustomerInfo WHERE intCustID = "
& idToEdit
>
> ' prepare recordset
> Set objRS = Server.CreateObject("ADODB.Recordset")
> objRS.Open SQL, objConn, 3, 3
>
> Do While Not objRS.EOF
> objRS("strCustLName") = Request.Form("clname")
> objRS("strCustCompany") = Request.Form("ccomp")
> objRS("strCustJobTitle") = Request.Form("cjob")
> objRS("strCustAdd1") = Request.Form("cadd1")
> objRS("strCustAdd2") = Request.Form("cadd2")
> objRS("strCustCity") = Request.Form("ccity")
> objRS("strCustState") = Request.Form("cstate")
> objRS("strCustZipCode") = Request.Form("czip")
> objRS("strCustCountry") = Request.Form("ccountry")
> objRS("strCustBus") = Request.Form("cbus")
> objRS("strCustFax") = Request.Form("cfax")
> objRS("strCustMobile") = Request.Form("cmobile")
> objRS("strCustEmail") = Request.Form("cemail")
> objRS("strCustSalesRep") = Request.Form("ncsr")
> objRS("strCustEmpContact") =
Request.Form("ncempcontact")
> objRS.Update
> objRS.MoveNext
> Loop
> 'End If
> %>
>
> <!DOCTYPE html PUBLIC "-//W3C/DTD/ XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html>
> <head>
> <!-- This is the title of the page -->
> <title>IMPulse NC Customer Database - Customer
Details</title>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
>
> <!-- This starts the CSS for the page -->
> <style type="text/css">
> body {
> font-family: Arial, Helvetica, sans-serif;
> font-size: relative;
> font-weight: bold;
> }
> table {
> background-color:#cccccc;
> border-color:#CCCCCC;
> }
> </style>
> <!-- CSS ends -->
>
> <link href="dbcss.css" rel="stylesheet"
type="text/css" />
> </head>
> <body>
> <table width="80%" border="1">
> <tr>
> <td>
> <img src="art/dblogo.gif" width="322" height="74"
/>
> </td>
> </tr>
> <table width="80%" border="1">
> <tr>
> <td colspan="2">Changes made to
>
<%=objRS("strCustFName")%> <%=objRS("strCustLName")%>
were
> successful. The
> database has been updated. Thank you
<%=strUserName%> for your update.
> </td>
> </tr>
> <tr>
> <td>
> <form action="custAdd.asp">
> <input type="submit" name="Added" value="Add
Customer" />
> </form>
> </td>
> <form action="results.asp">
> <input type="hidden" name="custID"
value="<%=strIdDet%>" />
> <input type="submit" name="submit" value="Search
Results" />
> </form>
> </tr>
> </table>
> </table>
> </body>
> </html>
>
> <%
>
> ' closes the objRS and objConn
> objRS.Close
> Set objRS = Nothing
> objConn.Close
> Set objConn = Nothing
>
> End If
>
> ' writes passed sessions to the browser for debugging
> Response.Write(Session("custID")) & "<br />"
> Response.Write(Session("username")) & "<br />"
> Response.Write(Session("userpass")) & "<br />"
> Response.Write(Session("sLevel")) & "<br />"
> Response.Write "My query looks like " & SQL & ""
> %>
>