Information générale
Catégorie:
The Mere Mortals Framework
Titre:
NewID() - how does it work?
Greetings!
I have a business object on a form that I am using just to add records when a certain event occurs in a different business object. The event causes a custom form method to be called and a business objects records are processed in a SCAN. Records are added to the business object I mentioned first during this SCAN.
I have set the business object that I am adding records to as the Primary Business Object on the form. Also, I use NEWID() for all primary keys in this system since everything is done through views, some a little complex.
Here's some of the code:
SELECT SCANnedView
SCAN
Thisform.bizobjname.new()
REPLACE some non-PRIMARY KEY information in the bizobjview && view associated with the busines object)
Thisform.save(.f.,.t.) && save the primary business object just added record
lnID = v_bizobjview.PKID && Save the PK ID because I need to update the SCANned View with the value
REPLACE foreignkey with lnID in SCANnedView
ENDSCAN
This appears to be ok...however, the lnID will contain a value, like 28. But, when I close the application and go look at the table that was updated by v_bizobjview, the value is 29????
Also, I noticed that the NEWID() method seems to skip numbers for every single record in every single table that I am using? There must be something I am missing here?
Any ideas?
Thanks!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement