Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a new order on two PCs
Message
From
14/07/2016 14:38:56
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01638327
Message ID:
01638400
Views:
48
>>>When Insert is executed via Cursor Adapter, the PK (being an Identity column) is created by SQL Server. No work is necessary on the VFP side. As I just mentioned to Naomi, no other customer ever reported this type of issue. So this is why I think that I need to do something about this tableupdate(). Force it to execute immediately (but how?). Basically in "logical" terms, I need to "lock" this table in the SQL server until Tableupdate() executes and a PK is created. Therefore, the other user will get a different PK. I am thinking about creating a semaphore file that will allow the first tableupdate() to do its job and then proceed to the next one.
>>
>>Have you really checked the server data after such an occurence? What you describe sounds VERY unplausible, so much that I would not rule out perhaps the first machine getting back the PK of the second insert unless checked with specific logging taylored to the problem.
>>But of 2 discrete insert statements one to be changed into an update and mysteriously given a correct key... Contact a certified hunter of magically endowed gremlins ;-))
>
>You are on to something. When I received a call from the customer and check for the problem that occurred last time (with this particular customer), I noticed and it boggled my mind that the audit trail table DID NOT have a record of the 1st Insert. At all. I could not figure how it would happen. But what you are saying maybe is explaining it. If the first Tableupdate() mistakenly "grabs" the PK of the 2nd insert (insert done by another station), the first PK is Gone and is never recorded in the audit table. I will try to create the logical steps to simulate this and see where it takes me.

there is an update written when you were replying. might be relevant ;-)

>I thank you very much for your input! (another thing, I am so impressed of the fluency of your English. How do you people do it?!. I have been learning Spanish for 30 years and I am not even close to your fluency in English. I take my hat off).

a combination of buying english books in school times, being friends/doing small time biz with some GIs stationed over here during puberty plus soldering TV to receive AFN when it was transmitted over here - also around these times ;-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform