Paradox Community

Items in pnews.paradox-programming

Subject:Re: Synchronizing priv tbls with master tbl
Date:Sat, 28 Jul 2018 09:34:50 -0400
From:"Steven Green" <greens@diamondsg.com>
Newsgroups:pnews.paradox-programming
all three machines MUST point to the shared net file using the EXACT SAME 
path/mapping, including drive letter

all three machines MUST point to any shared data using the EXACT SAME 
path/mapping, including drive letter

they can't just resolve to the same place, they must be addressed exactly 
the same way

--

Steven Green
Myrtle Beach, South Carolina, USA

http://www.OasisTradingPost.com

Collectibles and Memorabilia
Vintage Lego Sets and Parts
- and Paradox support, too
"Peter"  wrote in message news:5b5b7423$1@pnews.thedbcommunity.com...

Thanks for the reply Steven
In the simplest test I open a table (49 records,22 fields)on each
machine: 1 server/workstation, 2 workstations

I make a change to one field on a computer and in my mind that should
update that same field on the other two machines. It does, sometimes. I
found that on each machine switching to Windows Explorer and under
"View" I click "Refresh"  then after awhile the tables on all the
machines would update without switching to W-Explorer, as expected.

The server/workstation (call it mach #1) has drive E mapped to itself as
drive "I". The other 2 machines have mach #1's drive "E" mapped as
networked drives:

Mach #1 Mach#2 & #3
E   I (mapped to mach#1 E)
I (mapped to E)

I have confirmed that Mach#1 is the MasterBrowser, if that makes a
difference



On 07/27/2018 05:59 AM, Steven Green wrote:
> Peter, you're partially missing the point of the "refresh" concept.. 
> there's a big difference between not seeing changes others have made, and 
> not seeing changes to a record you're trying to lock or update.. or not 
> seeing changes to a calc that your trying to update
>
> maybe I missed something, but all I'm seeing here is "machine 2 doesn't 
> see what machine 1 did".. how does the code process what machine 1 does, 
> what is machine 2 trying to do that fails, how is your code testing for 
> it, what errors or messages are you getting, etc?
>
>
> -- 
>
> Steven Green
> Myrtle Beach, South Carolina, USA
>
> http://www.OasisTradingPost.com
>
> Collectibles and Memorabilia
> Vintage Lego Sets and Parts
> - and Paradox support, too
> "Peter"  wrote in message news:5b5aa799$1@pnews.thedbcommunity.com...
>
> More Experimenting
> I found I would get the "DataRefresh" message only when the form AND the
> table were open. The form's "DataRefresh" seemed to be triggered by the
> table change, not directly the result of a field being changed on the
> form displayed on one of the other computers.
> Mach #1 field changed ----->>>> Mach #2, table updated ----->>generates
> a "DataRefresh" which triggers form:action: "DataRefresh"
>
> Results
>   *Just the form open on each of the computers will not generate a
> "DataRefresh"
>   *The table opened on each of the computers will update the other
> computers, sometimes, ie, not consistently
>   *The "DataRefresh" in the action method is the result of the changes
> on the table which must also be open.
>
> I guess I'll have to put a machine together to act as a dedicated
> server. Not sure what else to check.
>
>
> On 07/26/2018 03:03 PM, Peter wrote:
>> I created a new form, added the table to the datamodel, added a 
>> tableframe, defined 4 fields. Saved, opened the same form on all 3 
>> machines.
>>
>> Inconsistent results, no pattern that I can see. Changing a field value 
>> on any of the machines did not update what was displayed on the other two 
>> machines. Sometimes if I scrolled down, or [PageDown] and then scrolled 
>> back up or [PageUp] it would refresh, most of the time it would not. 
>> Played around with it for hours.
>>
>> At one point I added in the record:action
>> if eventInfo.id() = DataRefresh then
>>     view("refreshing data")
>> endIf
>>
>> Sometimes it would work, sometimes not.
>>
>> I just closed the form and displayed the tables in edit mode on each 
>> computer. Now when I change a field value on any of the 3 computers the 
>> other two update within the 3 seconds I have set. sigh.
>>
>>
>>
>> On 07/26/2018 02:41 PM, Mark Bannister wrote:
>>> If the tables are viewed in a tableview and not a form they will not 
>>> refresh if they are open before the changes are made. (well, maybe 
>>> sometimes under certain situations).
>>> I don't think your mapping is the issue.
>>> Just slap one in a form and see.
>>>
>>> On 7/26/2018 3:34 PM, Peter wrote:
>>>> I just realized that I have a local drive mapped as a network drive.
>>>>
>>>> When my Pdox starts up (on any computer) it runs a script which reads a 
>>>> table that lists all the aliases and paths. eg, alias|path "Ticket" | 
>>>> "I:\DEV\TickDat". For this reason I need a common letter for all 
>>>> computers.
>>>>
>>>> The computer that has the files is the master browser and is also a 
>>>> workstation. The files are actually on drive "E" so I mapped it as 
>>>> drive "I"
>>>>
>>>> Would this have an effect? How often does Windows update the network?
>>>>
>>>>
>>>> On 07/26/2018 12:29 PM, Peter wrote:
>>>>> Thanks Mark,
>>>>>
>>>>> I have them all in edit mode, does that make a difference? Sometimes 
>>>>> it does work. I will try it by displaying in a form as you suggest.
>>>>>
>>>>>
>>>>> On 07/26/2018 11:37 AM, Mark Bannister wrote:
>>>>>> Peter:
>>>>>> If the tables are only open in a table view window they will not show

>>>>>> updates.  Display them in a form and they will get refreshed.
>>>>>>
>>>>>>
>>>>>> On 7/26/2018 12:50 PM, Peter wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 07/25/2018 07:36 PM, Liz McGuire wrote:
>>>>>>>> In the BDE on both computers, do you have LOCAL SHARE set to
True 
>>>>>>>> (Config > System > INIT), and STRICTINTEGRITY set to
TRUE (Config
>>>>>>>> > Drivers > Native > PARADOX)?
>>>>>>> Yes. I triple checked and all the BDE settings are the same on
3 
>>>>>>> computers (I added one more)
>>>>>>>
>>>>>>> I did a lot of experimenting yesterday, used 3 computers and 
>>>>>>> displayed just the 1 table. All were in edit mode. Used record
#1, 
>>>>>>> changed just 1 alpha field.
>>>>>>>
>>>>>>> Sometimes the other computers would update, 90% of the time they

>>>>>>> would not. It would work for awhile after all 3 were freshly 
>>>>>>> hard-booted, then it would stop working. Sometimes it would only

>>>>>>> work if I modified from 1 computer but not from the others, they

>>>>>>> each took their turn so no pattern there.
>>>>>>>
>>>>>>> I did find that if I went into Windows Explorer and clicked View
| 
>>>>>>> Refresh that it would seem to work more consistently after that.
I 
>>>>>>> was able to determine which computer was the master browser, 
>>>>>>> wondering if this is some kind of network refresh problem.
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Those are the first two things that come to mind.
>>>>>>>>
>>>>>>>> Liz
>>>>>>>>
>>>>>>>> On 25 Jul 2018 17:31, Peter wrote:
>>>>>>>>> So I decided to not use ri. I pondered this and decided
it must 
>>>>>>>>> have
>>>>>>>>> something to do with complicating record locking as opposed
to
>>>>>>>>> corruption issues.
>>>>>>>>>
>>>>>>>>> Anyhow I've started to work on a synchronization method
and 
>>>>>>>>> decided to
>>>>>>>>> go with detecting a datarefresh which will trigger the

>>>>>>>>> synchronizing
>>>>>>>>> routine. I thought there was a way to detect a DataRefresh
and
>>>>>>>>> DataRefreshOutside but didn't get anywhere with that, yet.
>>>>>>>>>
>>>>>>>>> The issue I am having is the failure of updating (refreshing)
data 
>>>>>>>>> in a
>>>>>>>>> table. I set up a simple test:
>>>>>>>>> * 2 computers: 1 workstation, 1 server/workstation (both
running 
>>>>>>>>> XPpro)
>>>>>>>>> * Both computers have the same table open and in edit mode
>>>>>>>>> * Test table has only 12 fields and ~50 records
>>>>>>>>> * Computer 1, manualy change a value in a field
>>>>>>>>> * Computer 2, no changes, have to press [ctrl][F3] to update
>>>>>>>>> * Refresh rate is set to 3(secs), retry is also set to
3 (both 
>>>>>>>>> computers)
>>>>>>>>> * Both computers have the same version of Pdox (v10)
>>>>>>>>> * Both computers run the same BDE (v5.2.0.2, thank you
Leslie)
>>>>>>>>>
>>>>>>>>> I doubt "write cache" and "oplocks" have anything to do
with the
>>>>>>>>> situation but both are disabled.
>>>>>>>>>
>>>>>>>>> Can someone advise why the tables might not be 
>>>>>>>>> updating/refreshing?
>>>>>>>>> Thank you.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 07/16/2018 12:46 AM, Leslie wrote:
>>>>>>>>>> Hi Peter,
>>>>>>>>>>
>>>>>>>>>> It would depend upon the requirements. Her are some
questions, 
>>>>>>>>>> some of
>>>>>>>>>> which may not be relevant:
>>>>>>>>>>
>>>>>>>>>> Is this a record level book in/bookout scenario ?
>>>>>>>>>> Can each user only add new data or can they modify
and delete as 
>>>>>>>>>> well ?
>>>>>>>>>> How long can the copy be away from the master - days,
weeks, 
>>>>>>>>>> months ?
>>>>>>>>>> How are you going to identify what has changed ?
>>>>>>>>>> How are you going to handle conflict resolution, ie
two users 
>>>>>>>>>> modify a
>>>>>>>>>> field to a different value within the same timeframe.
Who is 
>>>>>>>>>> correct ?
>>>>>>>>>> How does each User update their copy from Master to
get changes 
>>>>>>>>>> from
>>>>>>>>>> another User without losing any pending changes of
their own ? ie 
>>>>>>>>>> is
>>>>>>>>>> it a push up and then trickle down process ?
>>>>>>>>>> What happens when Master is currently being updated
from User1 
>>>>>>>>>> and
>>>>>>>>>> User2 also wants to update ?
>>>>>>>>>>
>>>>>>>>>> As you can see there is a lot to think about. We wrote
our own
>>>>>>>>>> Synchronization engine to handle these questions plus
more.
>>>>>>>>>>
>>>>>>>>>> So if it were me I would start writing a detailed spec
before 
>>>>>>>>>> doing
>>>>>>>>>> any coding as that process will help your mind focus
on the 
>>>>>>>>>> problem.
>>>>>>>>>> FWIW
>>>>>>>>>> Leslie.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 13/07/2018 6:58 AM, Peter wrote:
>>>>>>>>>>> I am building a database where each user works
on a copy of the 
>>>>>>>>>>> master
>>>>>>>>>>> table. Their copy is located in their own priv
directory.
>>>>>>>>>>>
>>>>>>>>>>> Before I start writing a long complicated way of
keeping the 
>>>>>>>>>>> master tbl
>>>>>>>>>>> and each user's priv tbl synchronized, I was wondering
if anyone 
>>>>>>>>>>> had
>>>>>>>>>>> some ideas of how I could approach it.
>>>>>>>>>>> * Should/could I make referential integrity links?
>>>>>>>>>>> * Could I cue a custom method on receiving a network
datarefresh 
>>>>>>>>>>> action?
>>>>>>>>>>> * Other?
>>>>>>>>>>>
>>>>>>>>>>> Thank you for any tips.
>>>>>>>>>>>
>>>>>>>>>>> Peter
>>>>>>>>>>
>>>>>>>>>> ---
>>>>>>>>>> This email has been checked for viruses by AVG.
>>>>>>>>>> https://www.avg.com
>>>>>>>>>>
>>>>>>
>>>
> 


Copyright © 2004 thedbcommunity.com