Peter Erhard
Mar 29th, 2000, 10:57 AM
Hi There!
When I save a new record in the database, I used before 'Select @@Identity' to retrieve the primary (or do I better call it unique index) of that freshly inserted record.
I then save some other record in a second table and save this unique index to create a one to many relationship.
Now I heart, its bad to rely on the value returned for @@Identity, because for an multiuser application. I can understand this perfectly.
But why should I not rely on this unique index to create my one to many relationship and what would be a better method?
Cheers,
Peter
When I save a new record in the database, I used before 'Select @@Identity' to retrieve the primary (or do I better call it unique index) of that freshly inserted record.
I then save some other record in a second table and save this unique index to create a one to many relationship.
Now I heart, its bad to rely on the value returned for @@Identity, because for an multiuser application. I can understand this perfectly.
But why should I not rely on this unique index to create my one to many relationship and what would be a better method?
Cheers,
Peter