Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 sp3, Remote Views and SQL Server 6.5
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00295864
Message ID:
00295953
Views:
31
>We would like to develop a VFP application that will run with either a VFP database or a SQL Server database (depending on the size of the client). All applications that we have developed to date have used a VFP database. I am beginning to experiment with Remote Views and SQL Server. A couple of commands that we always used in the past do not see to work with Remote Views: RLOCK, CURVAL and OLDVAL.
>
>Why don't these commands work? How do we deal with multi user issues (limit access to records, detect changes by other users, etc...)?
>
>Thanks for the help,

Hi Shane,

Those commands are native to VFP and work only with local tables. Remember that with remote views, your tables are in another database system entirely, with its own record locking scheme, referential integrity, etc. When you open a remote view, the result is simply a record set. Think of it as a plain old VFP cursor in memory, that you can add records to, delete records from, or modifiy data in. Your two major commands now will be TABLEUPDATE() and TABLEREVERT() to control updates back to the server.

You usually never have to worry about locking records on the front end, as each user would have their own copy of the remote view in memory on their local machine. When they all try to update a changed record at the same time, it's the VFP buffering scheme and SQL Server locking mechanism that take over.

We also once created an application that could flip from local tables (VFP) and server tables (SQL Server), and ended up using remote views for both. You can easily create remote views that work on your local VFP tables, then when you want to go to SQL Server, you just change the datasource of the connection and refresh the views (write a VFP script to do this). This, obviously, assumes you are using consistent table structures and data types on both sets of tables.
Phil
_____________________________
Phil Miles
http://www.philmiles.com
phil@philmiles.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform