Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dare I use the default data session?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00353286
Message ID:
00354452
Vues:
15
Since I use the form's dataenvironment in a conventional way, there is no USE statement to have a NOREQUERY clause. I don't want to seem dim, but how do I make use of it without dispensing with the whole dataenvironment object? The .nodataonload property of cursors in the dataenvironment isn't really analogous, and I can't use that anyway because users might enter the detail form directly, and not from the grid form.

I tried giving the grid form a private datasession and the detail form the default datasession. I get the same problem where the detail form jumps to the first record when I hit a nav button. It won't do it when I step through with the debugger.

>I have used the NOREQUERY for a local view with seemingly no problems.
>
>When I have a form that uses a Default DS, it is usually using the private DS of the form that calls that child form. So that term is a little deceptive. A form that is set to use a Default DS actually uses the DS of whatever object calls that form, be it another form or some object in the initial default DS [DS #1 or the application DS].
>
>Keeping data encapsulated in its own DS is the biggest reason I use private DS. I do not have to worry about messing up established relations, index orders, open tables and views that I may still need in forms already open.
>
>>I use local views. The help for USE sort of implies that the NOREQUERY clause is for remote views. However, I'm not sure how I would use that in my forms, which use ordinary DataEnvironments. I set the DataEnvironment.AutoOpenTables to .F. for each form. My form class calls an object from the .Load which receives the form as a parameter and points the oForm.DataEnvironment.Database property to the home folder (the usual removal of the hard-coded path) and calls .OpenTables(). How do I point my dataenvironment to the other form's datasession?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform