This topic is locked

Access Deletion Bug with Solution

6/10/2003 11:41:12 AM
ASPRunnerPro General questions
U
unitedwebcenters author

When creating pages to work with an Access database, I noticed that when I delete a record from the _list page, it successfully deletes the record from the database, but the record is still displayed on the list page. If the page is refreshed, the deleted record is no longer displayed.
I have found that if you add an explicit "dbConnection.Close" before the "set dbConnection = nothing" at the end of the code that does the deletion, this resolves the problem. I'm not sure of the cause behind this problem; perhaps the recordset may be cached as long as the connection is not explicitly closed. I haven't used the product with any other DBMS, so it may only be a problem with Access. I don't think the explicit close would hurt any DBMS the code might work with.
Please let me know if there's a better solution. If not, perhaps you could include this in a future ASPRunner version.
Jim Fennell

Vice President

United Web Centers, LLC

admin 6/10/2003

Jim,
I wasn't able to reproduce this behaviour.

My guess is that IE caches this page which also sounds strange.
Just in case I modified source ASP code to call dbConnection.Close before set dbConnection = nothing.
Best regards,

Sergey Kornilov