Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to refreshing local buffers immediately?
Message
 
 
To
31/01/2001 13:06:06
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00470592
Message ID:
00471223
Views:
31
That looks like the syntax is wrong so no locks are being performed. If none are completed successfully, you won't get the update.

The syntax is:
if rlock('1','myalias') then
   * it updated; continue processing
else
   * don't know; you decide what you want to do
endif
Your syntax attempts to find a record list using myalias and then apply locks to that list in workarea 1.

HTH.

>I tried the following command
>
>rlock( 'myalias', 1 )
>unlock all
>
>but this doesnt work!
>Added rows will not appear !
>
>How to refresh local table ?
>
>
>>The SET REFRESH command is used to set up background refreshing of locally cached data. If you want to explicitly update the local cache then you can issue an RLOCK() on the table and immediately release it. VFP will refresh the buffer on a successful lock.
>>
>>HTH.
>>
>>>I have a shared non buffered dbf file. I need to get latest data from it using SQL SELECT command.
>>>
>>>I have a command
>>>
>>>SET REFRESH TO 0,1
>>>
>>>in my form init.
>>>
>>>If records are added to this shared dbf file by other instance of VFP,
>>>SQL SELECT in another instance does not find added rows.
>>>
>>>This occurs on LAN or if two vfp programs are running on local computer using same dbf file.
>>>
>>>I discovered that adding a line
>>>
>>>inkey(1.5)
>>>
>>>before SQL SELECT fixes this behaviour: SELECT then returns latest data.
>>>
>>>However, adding inkey(1.5) 's before SELECTs decreases program speed.
>>>
>>>How to force VFP to refresh its local buffers immediately ?
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform