Primary key generate from a table for multiple table

95 views Asked by At

I have a settings table 'SettingTab' and a Number column 'nSlNo (int)' to generate primary key of two tables 'Tab1' and 'Tab2'. How to implement this without any number conflict when access setting table at same time by two tables.

1

There are 1 answers

0
rgb On

I used SQL scope or Begin-Commit Transaction. When I started accessing Setting table sent a Update command to the Setting table. So the table was locked till the Commit. By this way I avoid the Conflict.