Insert the new row and the related rows in a transaction, or add a "Pending" flag to the table, and have it default to True (meaning it is pending) and then have other parts of the system look for Pending==false rows.|||you can change the data type to uniqueidentifier, that way you'll knowthe id of that row since you'll be passing it a Guid that you create.
|||
In SQL Server GUID is a 16bytes binary data type, run a search for NEWID in the BOL (books online) and another option is DBCC CHECKIDENTITY. Try the link below for DBCC CHECKIDENTITY. Hope this helps.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_5lv8.asp
No comments:
Post a Comment