Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delayed network updates

Status
Not open for further replies.

jartman2

MIS
Feb 22, 2003
15
0
0
US
I have a multiuser inventory application on a Win2K server, NT/98 client network. I've noticed several times that if I change data in a table on one machine, it doesn't appear on another machine for some time (minutes or hours, or possibly until some specific action is taken).

In the most recent instance, I updated a parts list for an assembly on one machine, then on another machine, a user tried to generate a bill of materials (BOM). The BOM form uses PAL to summarize and format the parts list data into a temporary table in the local private directory. So the BOM's code uses tCursors to get the data from the actual tables, but its data model only refers to the private directory table.

I could re-run the BOM code as many times as I wanted, and it would never reflect the updates. But when I opened the form for editing the assembly data (which has the underlying table in its data model), the UI froze for a few seconds. After that I re-ran the BOM, and voila - she is correct!? Does anyone know what's going on here? Who is caching what, and why wouldn't the cache get flushed in this case?

- John
 
John,

You don't say what version of Paradox you're using, but in P8, go to Tools-->Settings-->Preferences, Database tab (on the client). You can set the Refresh Rate and Retry Period from there. If I remember correctly, a refresh rate of 0 seconds means no refresh at all. Low refresh rates, e.g. 1 second, will generate more network traffic. I use 60 seconds, and retry period of 3 seconds.

Padraig
 
Please note that in the example given in the web-page the following code is suggested:

[tt]
var
strKeyName String
siNSeconds SmallInt
endVar

strKeyName = "Software\\Corel\\Paradox Runtime\\" +
"9.0\\Pdoxwin\\Properties"
siNSeconds = 20

setRegistryValue( strKeyName, "RefreshRate",
siNSeconds, regKeyCurrentUser )
[/tt]

This works, however; I strongly suggest changing the typing of variable siNSeconds from SmallInt to String.

The original registry entry was of type string, but after running the code above the registry type changed to DWORD with options for Decimal or Hexidecimal stored values.

I don't know if this will actually affect anything, but why take the chance?

So the code now reads.

[tt]
var
strKeyName String
siNSeconds String
endVar

strKeyName = "Software\\Corel\\Paradox Runtime\\" +
"9.0\\Pdoxwin\\Properties"
siNSeconds = "20"

setRegistryValue( strKeyName, "RefreshRate",
siNSeconds, regKeyCurrentUser )
[/tt]

Please note check your registry to validate the string stored in strKeyName.
 
beanbrain,

Thanks for the tip; I'll update the article accordingly.

BTW, if you see similar goofs on the site, I'd appreciate a quick note via the Feedback link. It helps me stay on top of things.

-- Lance
 
OK, I'm glad to know about that setting, and I put the code into my startup script, but...

This isn't an issue with a UIObject refreshing from the table in the absence of an event. Every time I re-run the form (by hitting ENTER in the master part number field), there's a newly declared tCursor, opened afresh on the data table (as distinct from the private table in the form's data model). My code then scans the data table, accumulates the relevant info into the private table, and resyncs the tableframe to the private table.

Are you suggesting that the client's BDE is caching large amounts of data locally, rather than waiting for the drive share to respond, and that the refresh setting has something to do with that?
 
Oops, I forgot to clarify...

I'm using Paradox 9 and Application Frameworks. I haven't yet set it up to use Runtime.

- John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top