|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Retaining user until a table's particular field changes
Is it possible, using VB code, to retain a user on a particular page until the status of a certain field in a database is changed?
The scenario I am working on is that a person makes a reservation and has to wait until that reservation has been accepted or rejected by the administration. Dim dsResv As DataSet dsResv = objResv.DALgetResvStatus(resvId) While (dsResv.Tables(0).Rows(0).Item("resvStatus") = "pending") dsResv = objResv.DALgetResvStatus(resvId) If dsResv.Tables(0).Rows(0).Item("resvStatus") = "denied" Then failure.Visible = True LinkButton1.Visible = True ElseIf dsResv.Tables(0).Rows(0).Item("resvStatus") = "reserved" Then success.Visible = True LinkButton1.Visible = True End If End While This is how I tried to do it, but it doesnt seem to work. Any suggestions? |
|
#2
|
|||
|
|||
|
What do you mean by "doesn't seem to work"?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Quote:
I mean that the code is executed but i think the while loop is not working because when the 'resvStatus' is changed in the database, nothing happens on the webpage. |
|
#4
|
||||
|
||||
|
you have to re-query the database at each iteration.
otherwise, the first data you read is being stored in the memory and never changing. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Retaining user until a table's particular field changes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|