Ok i have a problem. An ASP page submits to itself where the code at the top of the page deletes the selected record or adds a new one, depending on what button was pressed. Then, right after the change is made, a new recordset is opened and queries the same table. (to show the results in a drop down list) The problem is that the 2nd recordset acts as if it can't see the changes that were just made. (the adding or deleting). When the page is refreshed, the 2nd recordset suddenly 'sees' the changes and shows them.
My question is how can i make it so that the 2nd recordset sees the changes immediately?
I'm using:
"rsDeleteEmp.open Delete_SQL, GetConnection, adOpenDynamic, adLockOptimistic"
where:
rsDeleteEmp = recordset object
Delete_SQL = SQL statement
GetConnection = connection string
I've tried using adOpenKeyset as well as adLockPessimistic, but neither of them do anything different. I suspect that it might have something to do with the 1st recordset "locking" the records so when the 2nd is loaded, it can't see the changes made. When the page is refreshed, there are no changes made, so the 1st recordset "unfreezes" the records. Am i on the right track here?
edit: clarified
Edit: Ok i'm a dumbass. I forgot to close the recordsets that are adding/deleting the records. It was probably locking out the 2nd recordset from viewing the changes...
My question is how can i make it so that the 2nd recordset sees the changes immediately?
I'm using:
"rsDeleteEmp.open Delete_SQL, GetConnection, adOpenDynamic, adLockOptimistic"
where:
rsDeleteEmp = recordset object
Delete_SQL = SQL statement
GetConnection = connection string
I've tried using adOpenKeyset as well as adLockPessimistic, but neither of them do anything different. I suspect that it might have something to do with the 1st recordset "locking" the records so when the 2nd is loaded, it can't see the changes made. When the page is refreshed, there are no changes made, so the 1st recordset "unfreezes" the records. Am i on the right track here?
edit: clarified
Edit: Ok i'm a dumbass. I forgot to close the recordsets that are adding/deleting the records. It was probably locking out the 2nd recordset from viewing the changes...