Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CodeMine Toolbar Requery button
Message
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00701003
Message ID:
00702187
Views:
18
Ivan,

>I've been using exclusively views, as I read everywhere that this is the best approach to write an app ready to go Client/Server. In this case, many of the views will be a match of the data source. Am I going the wrong way ?<

This is similar to why I have also been playing with view's - just preparing for a future need of using SQL Server, and it has been a struggle on some of these small tables because I didn't want to use a parameterized view. It just seems like you have to deal with a lot of extra items (requery, refresh, parameterized views, etc., etc.) just so that you can use a view in preparation for eventual SQL Server whereas none of these items are an issue when just using VFP tables. After reading your message here, and I haven't tested it, I wonder if the following could be done with CodeMine 7 without to much difficulty:

Create two CDE's for each Form. One for regular tables, and the other one using Views. Then, switch to views as needed by changing the forms cDataEnvironment property to ="cdeViewOneNow" from ="cdeTableOneNow". Also, have appropiate if/endif code to inform the Form to call a frmRequeryDialogCustom Form as needed when using a parameterized view. It looks like all of this could be done with a global setting, so that just one property would need to be changed in the global object.

This way, when SQL Server is not needed there are less issues to deal with, but when SQL Server is needed it would be easier to just "switch" to views. Perhaps Gary will chim in here with some thoughts. I do now it would be easier for me to create both a CDE for tables and views now as the Forms are fresh on my mind, rather than revisiting them a year down the road.

Mel Cummings
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform