I 'm writing a windows application which connects to sql server and performs a update action on a table.
Already there is another program named P2 which is altering the data in same table. So the table is locked
I am getting an error while accessing the table from my application
I need a solution in which the program first checks if the table is already locked and if the table is not locked the data has to be updated. If the table is already locked then it has to wait for a while and retry the operation.
Can anyone Provide me one??