Can't update an Access table

Results 1 to 2 of 2

Thread: Can't update an Access table

  1. #1
    Join Date
    Dec 1969

    Default Can't update an Access table

    I have an ASP page the uses a SQL Input statement to write to a database. The database has three tables. The first table contains peoples names, the second contains course names, and the third contains test information. The third table uses the first two tables as foreign keys. I write to the tables fine and can have multiple tests for each person. The problem comes when it is the same test (course) information. I can&#039t update the test information, it will simply leave what was originally written.

  2. #2
    snert Guest

    Default RE: Can't update an Access table

    what you have to do is select the information from the record set using some kinda criteria. such as you enter information into a form, say a text field or selection text box that has a value of "studentname" and is named student. And lets say your updating the mid term grade for that student and you have a column in the table named midterm and a column with the student names called student. and lets say you have a text box to enter the new grade called newgrade.<BR><BR>Then you need to write your SQL statement like this: Select midterm from TableName WHERE student=&#039" & Request.Form("student")& "&#039;"<BR><BR>Next you need to write the new info, so the code to use would be: Rec("midterm")=Request.Form("grade")<BR><BR>then call the recordset update<BR><BR>Rec.Update

Posting Permissions

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