Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ID field
Message
From
17/11/2006 11:44:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01170010
Message ID:
01170742
Views:
11
>>>>>1. Add records to buffered view/CA (not directly to the table)
>>>>>2. made all validations BEFORE trying to insert
>>>>>3. Lock the file
>>>>>4. get new id
>>>>>5. replace ID field in all view records with new one
>>>>>6. Update the Table
>>>>>7. UNLOCK file
>>>>
>>>>Boris,
>>>>It's "committed" situation, isn't it? See my second reply.
>>>>Cetin
>>>
>>>You talk about gaps, isn't it?
>>>but the gaps will happen only if the user deletes the record(s), not when insert and He/She decide to cancel operation.
>>>That is because ID is generated when user press SAVE not during the edit process.
>>
>>Not just with deletes, if I need ID before commit (thus before save).
>>Cetin
>
>Yes, but my suggestion was: new Id should be generated ONLY when the user press SAVE. No ID before that :-) No print enabled before save ;-)

Boris,
I don't know your original suggestion and I told Naomi before commit there would be always problems and she said flock() would solve. I meant how it would solve if needed before commit.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform