Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Way to create unique ID
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00743532
Message ID:
00743538
Views:
19
Nadya,

Take a look at my message one more time. I made some changes to it after I sent it.

>Sergey,
>
>The problem is, that in BldMstr table the RecNum is not sequential, e.g. I may have RecNum = 700, then 50 records in the DoNotProcess file. So, I would end up creating a new RecNum in the BldMstr, but it would correspond to the wrong Source ID.
>
>It looks like my first add should pick up the max number in Source file, but all other adds should pick up the max number in BldMstr...
>
>>
SELECT MAX(RecNum) INTO ARRAY laTemp
>>lnNextRecNum = laTemp[1] + 1
>>
If table is open shared issue FLOCK() before SELECT just in case and UNLOCK after.
>>
>>
>>>Hi everybody,
>>>
>>>Here is my situation:
>>>
>>>I've created Electronic Data Entry piece of Data Entry application. We receive files from registries in some text formats. I created a conversion program for each registry, that creates "source" file. Then another program processes this Source file and creates a work file, called BldMstr. This file has ID field called RecNum.
>>>
>>>There are some records in the source file, which should not go to the BldMstr file (nominal sales, for example). However, these records should go to "DoNotProcess" file.
>>>
>>>I number records in Source file sequentually.
>>>
>>>So, here is a scenario:
>>>
>>>BldMstr
>>>   RecNum - 1
>>>   RecNum - 2
>>>   RecNum - 5
>>>DoNotProcess
>>>   RecNum - 3
>>>   RecNum - 4
>>>
>>>
>>>Source File
>>>   RecNum - 1
>>>   ...
>>>   RecNum - 5
>>>*************************************************************
>>>In the Electronic Data Entry I allow some manipulations with BldMstr file, which basically allow to add new records. My problem is, I don't know, how to ensure, that each time, I add a record to this BldMstr file, I add a new unique ID.
>>>
>>>The DE application is stand-alone (not multiuser), so I was not using additional table (NextID table) idea...
>>>
>>>============================================================
>>>Can you advise something in my situation, please?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform