UPDATING A RECORD What are the options and which i

Results 1 to 2 of 2

Thread: UPDATING A RECORD What are the options and which i

  1. #1
    Join Date
    Dec 1969

    Default UPDATING A RECORD What are the options and which i

    Hi i have a situation where the user must find a record and update it. <BR>What are the options I have for having the user update a record ?<BR>and which one do you all feel is the best way?<BR><BR>Sincerely Stephen

  2. #2
    NEil Popham Guest

    Default RE: UPDATING A RECORD What are the options and whi

    i dont really know how much you know or from what angle you are coming from here - but here is a very simplistic solution which i generally follow.<BR><BR>1. you need to provide a search to pick what record is to be amended. i generally do this by letting the user/administrator select a group of records, which brings in a list, where they then see more information on each record and select the one they wish to amend.<BR><BR>eg: let them select a category from a dropdown list, and list all records in that category<BR><BR>this ensures that FURTHER detail is given before they choose to amend the record. if you let them pick by name there may be duplicate entries which could cause problems.<BR><BR>2. when listing the records provide a hyperlink for EACH that passes the unique ID field to FORM<BR><BR>on the form ASP page select that unique record from the database, and use it to populate the forms elements. eg:<BR><BR>&#062; &#060;input type="text" name="Field1" value="&#060;%=objRec("Field1")%&#062;" size="30"&#062;<BR><BR>3. when processing the form you need to create an SQL statement with the following format:<BR><BR>&#062; "UPDATE MyTable Set Field1=&#039" & strField1 & "&#039, Field2=&#039" & strField2 & "&#039 WHERE ID=" & lngID<BR><BR>and execute it using a command or connection object<BR><BR>this is obviously vary vague. please post any queries. of course the solution will depend partly on what you are SPECIFICALLY trying to achieve...<BR><BR>neil<BR>

Posting Permissions

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