I agree with the testicular remedy, but in the case of the iron codpiece, I
can think of another approach which may work for you. It still uses Select,
but reads a one-row table, so it shouldn't hurt performance much. The table
serves no other purpose than storing the next available PK; call the table
NextPK, say. The algorithm might go like this:

1. Lock the table NextPK.
2. Select its value.
3. Update the column with current value + 1.
4. Unlock the table.
5. Do your inserts.

The lock will be very brief, perhaps brief enough to satisfy your
requirement.

-- 
Arthur
Cell: 647.710.1314

Only two businesses refer to their clientele as users: drug dealing and
software development.

-- Arthur Fuller

Reply via email to