Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the CursorSource in the DataEnvironment
Message
De
07/07/1998 22:41:35
 
 
À
07/07/1998 22:20:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00115080
Message ID:
00115125
Vues:
13
>>YOu change the cursor's database property it with form code in the dataenvironment's beforeopentables event.
>
>I'm sorry Erik, that was kind of vague. My understanding is that
>as soon as the cursor object is instatiated, the table is opened.
>Is this not the case? You said 'database property', am I correct
>in assuming that you meant the CursorSource, or is there another
>property which I should be looking at (these are free tables).
>
>Thanks for your response.
>

I guess it was a little vague. And you are correct, the database property is of no consequence to you since you are using free tables.

That the table is opened when the cursor object is instanciated is only partially correct. AS members of the DE, cursor objects are instanciated, but their tables are not opened until after the form.dataenvironment.beforeopentables event. That's why this is the perfect place to put this code (it can also go in DE.init or form.load).

The common way to do this is to check the value of a global variable or an application object's property that tells your DE where your tables are, and then loop through the cursor objects in the DE, changing the cursorsource property accordingly.

Hope I was a little clearer.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform