General information
Category:
The Mere Mortals Framework
>Hi,
>Thank you for reply.
>Then do you have any suggestions?
Umm, Hilmar has more experience than I do?
>I plan to set lAutoPrimaryKey = .F., create a uniqueID BizObj class, then retrieve the ID value without increase it kBizObj.OnNew()(For display purposes). Then, call loDataAccess.GeneratePrimaryKey() during kBizObj.save(). Do you think is is worth? BTW, I don't see any hook that allow me to do this, since PreSaveHook() is not in BEGIN TRANSACTION scope. Any ideas?
I've never tried to do this, so I'm speaking hypothetical. It looks like you're on the right track, however, I'm not sure you can use NewID() as the default field value (what GeneratePrimaryKey uses. Simple testing should prove me wrong(I hope), but I'm worried that with a primary/candidate index you'll have an index violation trying to add more than one record. Local views, table buffered to avoid accidental saves, should avoid this.
As for PreSaveHook() not being in the transaction, you might suggest to Kevin that it be moved there.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only