Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lets talk Views
Message
From
18/10/1998 14:33:45
 
 
To
18/10/1998 12:16:54
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00147912
Message ID:
00147955
Views:
39
>There are many issues to using views, and personally I barely think they're worth it. Josh talks about using them for lookup tables, which I think is the MOST useless example of them (no offense, Josh, I'm sure you have more supporters on this than I).

Josh supporter #1 here. Jim- if your app is operating on local data on a fast network with little concern for network traffic and absolutely no shadow of a chance for C/S upsizing in the future, then tables are fine. But I think you've missed the major point about the huge advantage to using views in all other scenarios. If Josh's app uses strictly views (even for lookup tables), then he can switch to remote views without changing a single line of code in his forms.

I have yet to implement a full client server app, but I know that I will have to in the future, and I know that some current clients will eventually need to move to a more secure database than VFP can provide. Since I use only views in my forms, I am ready.

Once you are familiar with the techniques needed for view-based forms, they are really just as easy as table based forms. There is not really any more work to it, just different work. The client server mentality is based on the premise that the user has an idea what he wants to see before he sees it, and in the real world, there is not much need to look at a list of 10,000 names in alpha order to decide which record to look at.


> I find this to be very limiting, as any misspelling ('fabioni') will not put you close, it will tell you there is nonesuch.
>

Sure, if a user types "Fabioni" when he meant to type "Fabiani" the view will return an empty recordset, but that doesn't mean I can't return all the "Fab"s or even all the "F"s for him to choose from.

>For lookup tables I issue a straight SQL in the Init (or ReQuery if the contents are based on the value of another control).

Try this with MS Access data on the back end.

>
>You _can_ create the view with "no data on load" to lower startup time.
>

You shouldn't be querying a view until after you have a parameter anyway. Views created without parameters should only be used on lookups.

>You're right about them not having indexes.

This doesn't mean you can't index them. You just have to do it at runtime.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform