Hi,
This is probably an easy question to answer.

How would I code a procedure in SQL Server to do the followibg. Accept a variable(var1) and a recordset(rst) sent from a VB6 app, and then:

1)delete * from table1 where field1 = var1
then
2)add rst to table1

The important thing is that if two people run the procedure at the same time, l have to make sure that it runs the delete and add straight after each other and not run the delete for person 1 and then the delete for person 2 and then the add for person 1 and the add for person 2 (otherwise l will get duplicates). I guess this will require record locking.

Also how would l call this procedure from vb6.

THANKS HEAPS.
UNI.