I have a web page that shows a table view of records from my Access database. You enter the customer Acct # and the records appear. I have made it so that clicking on one of the records will delete it (after a confirmation box) from the database. I do this by submitting the value of the record to the page, and running a delete command on a recordset that contains only that record. I then close the recordset and open a new one that is used to list the records. On my test system this works fine, when you delete a record the table is immediatly updated. However, on my production server it doesn't. You have to refresh the page to get the correct listing. Here is my delete code. Please help if you can.
deletedValue = Request.Form("delValue"
if NOT deletedValue = "" then
set deleteSet = Server.CreateObject("ADODB.Recordset"
deleteString = "select * from tblSchools where cust_ID ='"&custid&"' AND SchoolName ='"&deletedValue&"'"
deleteSet.open deleteString, strConnect, adOpenDynamic, adLockOptimistic
deleteSet.Delete
deleteSet.Close
set deleteSet = Nothing
Response.Write deletedValue & " was deleted from the database."
end if
deletedValue = Request.Form("delValue"
if NOT deletedValue = "" then
set deleteSet = Server.CreateObject("ADODB.Recordset"
deleteString = "select * from tblSchools where cust_ID ='"&custid&"' AND SchoolName ='"&deletedValue&"'"
deleteSet.open deleteString, strConnect, adOpenDynamic, adLockOptimistic
deleteSet.Delete
deleteSet.Close
set deleteSet = Nothing
Response.Write deletedValue & " was deleted from the database."
end if