I need to connect to my SQL server 2008 database using my ASP script. I am not using stored procedures.
I would like to do a SQL Select command to select a value from a table then depending on the value I then need to do an Insert command to insert a new row. It is not relevant what the Select and Insert commands actually do as regards my question.
I would like to know how I can lock the table while I do the Select and Insert. During this period I DO NOT want the table to be read, updated or inserted. After my insert command I would like to unlock the table.