Hi,
I'm not familiar with ASP. I'm working on a screen just kind of feedback form. This page need to show only once prior to main page.
In other words, when user access the main page,the request screen will show up first. User submit information from question screen and go to main screen do something and logoff. When user access the main page in the future, the request screen will never pop up.
I created a table to store the user id to trace the
user's access history for the question screen.
My following code intends to check if the user id exist. If yes, the request screen will not pop up.
My code doesn't work.
Could you tell me how to modify it? And, which event I should use to fire my code? Your help will be great appreciate.
SUB CHECK_USER_EXIST()
Set cmdRequest = Server.CreateObject("ADODB.Connection"
cmdRequest.Open application("ConnectionString"
cmdRequest.Mode = adModeReadWtrite
Set rsRequest = Server.CreateObject("ADODB.Recordset"
rsRequest.Open "TABLE", application("ConnectionString"
sql=""
sql="Select * from TABLE where USERID = '" & USER_ID & "'"
cmdRequest.commandtext = sql
rsRequest.Open cmdRequest, , 1, 3
If (rsRequest.recordcount > 0 ) then
set application("REQUEST SCREEN" = Nothing
end if
END SUB
I'm not familiar with ASP. I'm working on a screen just kind of feedback form. This page need to show only once prior to main page.
In other words, when user access the main page,the request screen will show up first. User submit information from question screen and go to main screen do something and logoff. When user access the main page in the future, the request screen will never pop up.
I created a table to store the user id to trace the
user's access history for the question screen.
My following code intends to check if the user id exist. If yes, the request screen will not pop up.
My code doesn't work.
Could you tell me how to modify it? And, which event I should use to fire my code? Your help will be great appreciate.
SUB CHECK_USER_EXIST()
Set cmdRequest = Server.CreateObject("ADODB.Connection"
cmdRequest.Open application("ConnectionString"
cmdRequest.Mode = adModeReadWtrite
Set rsRequest = Server.CreateObject("ADODB.Recordset"
rsRequest.Open "TABLE", application("ConnectionString"
sql=""
sql="Select * from TABLE where USERID = '" & USER_ID & "'"
cmdRequest.commandtext = sql
rsRequest.Open cmdRequest, , 1, 3
If (rsRequest.recordcount > 0 ) then
set application("REQUEST SCREEN" = Nothing
end if
END SUB