Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiuser - Data from another station appear?
Message
From
11/11/1997 10:40:01
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
11/11/1997 10:03:57
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00058523
Message ID:
00059518
Views:
36
>>>>>I am desparately seeking help. My users are jumping all over me.
>>>>>
>>>>>I have this strange problem. When I am in network environment, my invoice details sometimes get clobber up with details from another station. Any idea what is the reason?
>>>>>
>>>>>I am using NEWID() function in TASTRADE to generate my master table primary key (surrogated). In my grid, I set ALLOWADDNEW = .T. and in BeforeRowColumnChange, I replace foreign key with my master key whenever it is empty. The master-detail table is related together in the data environment and in my gird, the LinkMaster, ChildOrder, RelationalExpr and RecordSource are all set properly. I am using private data session and optimistic buffering.
>>>>>
>>>>>It seems that while my master key didn't move, my grid just suddently got fill up with a few rows of data of another master key (I placed the foreign key field into one of the columns). It seems to happen mostly when the other user saves his invoice.
>>>>
>>>>I am going to assume that when you add a detail row to the grid each row has the same Invoice Number. Do the rows that suddenly appear in your grid have the same Invoice Number as the rows that were originally there? If so your NEWID() function is not working properly with respect to assigning Invoice numbers. If the Numbers are different, are you setting a filter on the table to only display those rows whose Invoice Numbers are equal to the one assigned by NEWID()?
>>>
>>>Shih- (is that your first name?)
>>> To narrow down the problem, take a look in tables themselves to see if records that you think should have certain foreign keys really have the keys you expect. This will ascertain if the problem is with the way the data is stored, or the way you have the form set up.
>>>On a side note...
>>>I experienced the same difficulties you are experiencing now when trying to set up my forms with the Linkmaster/childorder etc. properties of grids and relations. While many people use these tools successfully, I never got them to work in some of my more complex forms. (One-to-many-to-many, or two one-to-many relationships) For these more complext forms, I began using parameterized views set to nodataonload on startup. After getting used to this idea, I changed over all of my forms (even the simple ones) and have never regretted it for a minute. I have no relationships in the DE. All of the coordination of cursors is done manually with SEEK and REQUERY() . When all is said and done, the extra code doesn't amount to all that much, and the number of headaches it saves by allowing me to control exactly where the record pointer is and which record the grids are showing children is enormous. People do this both ways, and there are arguments for each, this is just my philosophy (much of
>>>which I have Edward to thank for).
>>>
>>>Erik
>>
>>I use parameterized view for complicated form too. I just don't expect a simple one-many form cannot work using DE.
>>
>>I suspect there is a bug in MS refresh routine because when I do tableupdate on one station, it affects the display on the other station. I can even simulate it in private data sessions on a single station. I have created a simple 1-many form to test and it gives me the same result.
>>
>>I am quite desparate as I have been stuck to this problem for weeks already. I will greatly appreciate if you have some good advices. I am reluctant to change to parameterized view because the whole project has been completed except with this problem.
>
>I wish I could help you more, but I really have no idea what could be happening in your app. I am reluctant to write it off as a bug, however... I believe that if it were, something that major would be better documented. How many one-to-many forms do you have that are affected by this behavior?

About 6 to 7 forms. But they are all identical in structure.

By the way, I found that by changing from APPEND (using AllowAddNew) and REPLACE to INSERT, my simple test forms works perfectly. There is a chance that this is the culprit.

I am still trying out my actual form. It still seems to have problems. I hope it is my bug.

By the way, thanks for responding. You are very helpful. If there is anything I can do for you., please don't hesitate to drop me a mail.
Previous
Reply
Map
View

Click here to load this message in the networking platform