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 Room when someone else already added the same booking date range. The simple scripting I can think of is:
** Check if specific record exists ****
dim rsExists, rsExists1, rsExists2
set dal_table=dal.Table("batchD")
set rsExists = dal_table.Query("startDate>='startDate'","")
set rsExists1 = dal_table.Query("endDate>='endDate'","")
set rsExists2 = dal_table.Query("trRoom='trRoom'","")
if not rsExists.eof and not rsExists1.eof and not rsExists2.eof then
' if record exists do something
else
' if dont exist do something else
end if
rsExists.Close : set rsExists = Nothing
rsExists1.Close : set rsExists1 = Nothing
rsExists2.Close : set rsExists2 = Nothing
Please help to provide a sample code to achieve this.
The table is "batchD" and the column names are "startDate" "endDate" and "trRoom".
Thank you.