Hi,
I'm using version ASPRunner Pro 6.2 Built 5242.
At ADD page, Before record added, how do I check for specific records exists? Basically, I want to prevent a user from booking a resource when someone else already added the same booking date. The simple scripting I can think of is:
If Request.Form("date")=rs("date") then
Response.Redirect "book_list.asp"
end if
I actually don't know how to use the default scripting below:
** Check if specific record exists ****
dim rsExists
set dal_table=dal.Table("AnyTable")
set rsExists = dal_table.Query("AnyColumn='AnyValue'","")
if not rsExists.eof then
' if record exists do something
else
' if dont exist do something else
end if
rsExists.Close : set rsExists = Nothing
Please help to provide a sample code to achieve this.
The table is "book" and the column name is "Date".
Thank you.