Updating Records

Results 1 to 2 of 2

Thread: Updating Records

  1. #1
    Julius Cornado Guest

    Default Updating Records

    Hello...I am somewhat new to ASP and am just gettng into updating the database. I want to make a page where logged in users can come to to either add information about their vehicle, or update what is already there (all this using one form). However, when I try to look into the database for a user that isn&#039t in that table I get the error message:<BR><BR>Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record. <BR><BR><BR>How can I make it so that if there is no info the form comes up blank. Here is my code. Regards..Julius<BR><BR>&#060;% <BR><BR>myDSN="DSN=MyDSN;uid=sa"<BR><BR>set conntemp=server.createobject("adodb.connection")<B R>conntemp.open myDSN<BR><BR>sqltemp="SELECT * FROM tblAuto where UserID=" & session("UserID") & ""<BR><BR>set rstemp=conntemp.execute(sqltemp)%&#062;<BR><BR>&#0 60;% If "UserID" &#060;&#062; session("UserID") Then %&#062;<BR><BR>INSERT A TABLE WHERE USERS CAN ADD THE MAKE AND MODEL OF THEIR CAR.<BR><BR>&#060;% Else<BR><BR>Make=rstemp("Make")<BR>Model=rstemp("M odel")<BR><BR><BR>rstemp.close<BR>set rstemp=nothing<BR>conntemp.close<BR>set conntemp=nothing<BR><BR>%&#062;<BR><BR>INSERT A TABLE WHERE INFORMATION ABOUT THE MAKE AND MODEL OF THE USERS CAR SHOWS UP IN A FORM AND THEY CAN EDIT IT.<BR><BR>&#060;% End If %&#062;

  2. #2
    Steve Cimino Guest

    Default See response below

    Error in page numbering. It applies to this also.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts