Typically when generating an ID you let the DBMS where records are being stored determine the ID, and after inserting the record you fetch the identity value. If you want to generate a unique ID in an application at runtime use System.Guid.
string id = System.Guid.NewGuid().ToString();
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735