Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local view or cursoradapter?
Message
 
 
À
25/02/2005 21:22:42
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00990608
Message ID:
00991163
Vues:
19
>Thanks to all who have replied to this thread so far. Looks like subclassed CAs are the way to go, but before I dive in, I have a few more questions...
>
>How do I get a class-based CA representing a view into a form DE? I created a test CA and stored it in a .vcx class library, but I can't work-out how to get the CA into a form DE. I've tried dragging from the class-browser but that doesn't work. Right-clicking in the DE presents an 'Add cursoradapter' menu option, but this only appears to create a CA from scratch. Once in the form.DE, is the CA automatically opened like any other table or view?

In the DE, right-click and select the Builder... option. Click on the second tab, "2. Cursors" and click the Add... button. Find the VCX with your CAs, then select the CA from the VCX you wish to add. Edit the Name and Alias properties in the builder if needed. Add other CAs as needed then close the builder.

>If MyCA.SelectCmd='SELECT * FROM MyTable WHERE myField=?lnMyParameter', can I still refresh a view using...
>lnMyParameter = nMyValue
>SELECT MyView
>REQUERY()

lnMyParameter = nMyValue
THISFORM.DataEnvironment.CAObjectName.CursorRefresh()

>I can see that I can create a CA using the builder called from a form DE, but where is the code that creates this CA stored? If created via. a form DE, can the CA only be used for that form?

Yes, if you use the native CA builder, that CA can only be used in that DE. You can however save the DE as a class - File, Save as Class...
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform