Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Views, I choose commands vs designer, but other question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00029998
Message ID:
00030115
Vues:
44
>>>I know that much about views have been discussed here, but here it is again. I am requesting all opinions here.
>>>
>>>Because of the limitations of the view designer, I'd prefer to use commands to create all of my views when needed by a form, even the simple ones to maintain consistency. Where is the best place to issue the CREATE VIEW command. As a stored procedure? As a method to a class? Within the DE of a form? How best to get it into the DE of a form if created outside of the form? What are the pros and cons of any particular method used?
>>>
>>>What is the best way to create parameterized views assuming that the parameters will be somewhere available probably as a field on a form?
>>>
>>>The database needs to be exclusive when issuing CREATE VIEW. Is everyone putting a local copy of the *.DBC on the client? How best to maintain this if table defs change?
>>>
>>>I've read the Extending Methods and Indexing View article in the VFUG Newsletters as well as the Introduction to Client-Server Development in VFP.
>>>I've also been through the MS Knowledgebase and read
>>>pertinent articles on views. Non seem to indicate exactly how to design a well maintainable app using views.
>>>
>>>Any and all help with the implementation of views in an application will be greatly appreciated. Thanks,
>>>
>>>Steve Despres
>>>EZ Data Inc.
>>>sdespres@erols.com
>>
>>I use the View designer for views which are simple and SQLEXEC for selects that are more complex. When I change the SQL Tables, I modify the views and distribute a new DBC to the client, who then distributes that to each user machine. There are less than 50 user machines at this time, so although it takes a little time, it is not bad.
>
>Thanks Gail. You've answered the multi-user and a local copoy of the database issue. But if you are using SQLEXEC, where are you putting the command such as if you need this view for a form? And isn't SQLEXEC usually used for remote views? This app is being designed to handle a local database, which will used local views, and then a database on SQL-SERVER so I must design the app with this in mind.

Yes, SQLEXEC is for remote views. In some cases, I put this in the menu procedure before running the form. Then the resulting cursor is available when the form runs. My app uses a combination of parameterized views and SQLEXEC. Selecting data for a report is one place SQLEXEC is great, because the result is only used on the report and not on the form. Parameterized views have been much easier for me to use when I need that data on a form. I sometimes use two DBCs in my project, one for the application and one for me to use to examine the data in total or in different chunks than I use on the forms. My DBCs were getting quite large in some cases, so this helped. Can't the Create View go in the form load? Doesn't this event fire before the DE inits?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform