Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Views and Dataenvironment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00162487
Message ID:
00162900
Vues:
28
Thanks. My understanding is that when I run an query against a remote view, ODBC redirects the query to the underlying tables. The requests are too dynanmic to use parameterized views.

For example, I would like to populate picklists dynamically based on previous picklist selections which makes the where clause longer and longer. If the forms dataenvironment is private, views (local and remote) return 0 records. If the the dataenvironment is default, local views work fine but the remote views seem to download every record before applying the where condition (The status bar shows hundreds of thousands of records fetched to return 4 in the result set).

I guess I have two questions/issues: Why does the setting of the dataenvironment effect the result sets of views? Why isn't ODBC sending the 'WHERE' clause to SQL?

------------------------------------------------------

>Troy,
>Are your views parameterized? If not, then they should be to limit the data. With a parameterized view, only the correct subset of data will be loaded.
>
>Also, if you have set 'no data on load' before the form is initiated, try doing a requery()on your list box sources to update them after the view is requeried with the correct subset of your master tables. You can do this in the INIT method.
>
>HTH
>Barbara
>
>>The Environment:
>>
>>I am having trouble working with views and the form dataenvironment. I have a database with local and remote views (some of source tables are a million records or more). I then create a form and add a few of these views to the form dataenvironment. I then have a method that tries to populate picklists by running a 'Select' statement against these views into an array.
>>
>>
>>The Problem:
>>
>>If I set the dataenvironment: 'NoDataOnLoad' property to True (as sugested in the programmers guide) the select statment returns 0 records. If I set this property to False, the form takes over an hour to initialize, but the select statments now work fine.
>>
>>I have similiar symptoms with views when I set the form to a Private Data Environment. It seem to behave the same way with remote or local views.
>>
>>What am I missing here? I certainly cannot have forms that take 78 minutes to load and I cannot migrate the data off SQL.
>>
>>Thanks for any sugestions!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform