Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local tables
Message
 
To
25/04/2006 15:26:26
Koos Veel
Gamma Research
Aruba
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MySQL
Miscellaneous
Thread ID:
01116464
Message ID:
01116511
Views:
20
If you need to have local tables, then you need to develop some strategy within the application to update them on a periodic basis. The simplest approach would be to create a last_mod field in each table on the server. Every time the user updates the system table, have a trigger update the last_mod field with the current date/time value. Also have the trigger update another master table that keeps track of the last time each table was updated.

Then in your application when it loads, check the server master table with the local copy of this table to see which if any tables were recently updated. To improve performace when you download the new tables, only pull the records that were recently updated (ie last_mod) field.

There are additional things that you may want to consider such as having a timer control periodically check to see if changes have been made while the user is in the app and if so, update the local tables then also.

My personal preference is to avoid local tables all together but if you must have them, this is certainly doable.

Kurt

>Dear All,
>
>We are developing an application using MySQL as the back-end and Visual Foxpro 9.0 as the front-end. Since the application must run on different locations in the world we think of accessing the data on a server using TCP/IP via a public IP address.
>There are several lookup tables that can be edited through the application (but rarely are) that are queried all the time (a table with the security settings for instance). We think of keeping these tables local VFP tables but wonder how we could best update these tables when someone in the world would make a change to them, or is it a bad idea to have local tables at all?
>
>
>Thanks,
>
>Koos Veel.
Previous
Reply
Map
View

Click here to load this message in the networking platform