Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remedial Transaction/Buffering/View Question
Message
From
30/03/1998 22:25:02
Stephen Bridgett
Stephen Bridgett Consulting
Gloucester, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00085516
Message ID:
00088294
Views:
46
>>Agreed, now here is an interesting situation. I'm logging calls and each call gets a new incremented number, begining with 1 for the first call of the month. I record a lot of detail against each call and my call form is modeless. I can receive another call before I complete the first one. The new call number is dependent upon the previous one which is in transaction. Further, I really want my call numbers to be sequence contiguously. But, if I cancel the first call, the second is in transaction and already has what it thinks is the next call number, 2. Hmm. not trying to be argumentative, this is a real situation.
>>
>>Bye the way Jim, we met a FoxTeach and I hope to be at DevCon. Thanks for the chat and assistance.
>Stephen,
>
>Ok here's the thing, you need to datetime stamp each call as it comes in. The sequential call number it eventually gets should not have anything to do with the Primary key for the record. Get the primary key through a primary key table, that is a table that has the call table name and the enxt PK integer to use, open that table, seek the record lock it get the id increment the id in the lookup and then unlock it.
>
>Use that Interger as the primary key for the table. As part of the data save the datetime stamp from DATETIME(), which will give you one second resolution. Don't worry about the PK's not being consequetive. At a time when the phone calls are not coming in you can scan through the table in datetime order and assign the call numbers that are sequential.

Ya, I can see this is becoming a data maintenance, quiet hour type routine to resequence the call numbers.
Stephen Bridgett
Hand Crafted Relational Database Solutions
Focusing on Visual Foxpro and Object Oriented Design
SBridgett@cyberus.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform