I am thinking to use a GUID in my .net app which uses SQL Server. Should I be writing a stored procedure which generates the GUID on each record entered or should I be directly generating it from the application.
Reasons for asking the question (If am wrong correct me in this):
I (as/pre)sume:
When generating the GUID from the database, you can assume that the DB remembers the previous generated GUID where as the application remembering it is difficult.
SQL Server has the creation of GUID’s built in. There is no need to write a separate stored procedure for this.
You can use
The key difference between both procedures would be that the sequential GUID should be used if it is for a primary clustered key.
I’m not sure why you would want the database engine to remember the previous generated GUID.