Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NewID() - how does it work?
Message
From
02/03/2004 18:12:02
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
NewID() - how does it work?
Miscellaneous
Thread ID:
00882543
Message ID:
00882543
Views:
83
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!
Next
Reply
Map
View

Click here to load this message in the networking platform