Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE myview NODATA... and VFP ask for parameters???
Message
From
06/01/2000 09:06:23
 
 
To
06/01/2000 08:53:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00313345
Message ID:
00313856
Views:
49
>>
>>I'm not sure wshat is causing the problem- I've never run into it because I have never tried to create a view with a GROUP BY clause. If your view does not need to be updatable, why not just use a plain ol' SQL query?
>
>PMFJI-
>
>I can think of two reasons:
>
>1. Wants the query to run on the back end(performance).

A view is NO different from SQL here. If it is local data, the query NEVER runs on the backend anyway. If it is remote data, SPT will accomplish the same thing as a remote view (they are internally the same thing)


>2. Doesn't want to have to grab the entire data set, only the grouped dataset(network traffic).

With VFP data, this is not an issue because you can't control it. And I never said that you can't use a parameter in an SQL Query:

lnID = 12345
SELECT * FROM MyTable WHERE SomeID = lnID INTO CURSOR MyCursor


Neither of these reasons is valid. IMO, local views are used entirely too much, sometime just for the sake of using them. I use 2 questions when deciding whether to use a local view or plain SQL:

Does the dataset need to be updatable?
Am I using this same query all over creation?

If the answer to these is no, then there is no need for a view. Even if the first is no, and the second is yes, an argument can be made for using a query in a prg (qpr) instead.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform