Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Using SQL and local data
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00084391
Message ID:
00084402
Views:
28
>Can a VFP application be developed to use an SQL server when networked, but when the exe is distributed use local tables. If this easy to accomplish or is this two separtate developments (network and distributed exe). I have someone here who believes that VFP can be switched SQL/NonSQL at run time. I have no experience with client server so I have never approached VFP but in the DBC/local tables concept. Any suggestions would be appreciated.

We have gone through this exact thing. VFP can't be switched like your colleauge suggests. Using backend servers involves ODBC while local tables are accessed directly. What we did was include a one row table with the app that has a logical field in it called clserve. On startup we set a global logical named glClientServer. Then, for every data query we have an if test. If glClientServer is true, we use code for backend data retrieval. If it's false we use code for local access. While this makes the code kind of ugly, it allows users to switch the apps data access with one quick field change.

HTH
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Previous
Reply
Map
View

Click here to load this message in the networking platform