Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a different database depending upon user
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00125834
Message ID:
00126360
Vues:
20
Jamie,

Try this:
amembers(acursors, thisform.dataenvironment, 2)

 for i = 1 to ALEN(acursors,1)
    oDataEnv = EVAL("thisform.dataenvironment." + acursors[i])
    if oDataEnv.baseclass = "Cursor"    
       **  This keeps you from changing relations
       oDataEnv.cursorsource = cpathvar + oDataEnv.cursorsource 
    endif
 endfor
HTH
Barbara

>Barbara,
>Thanks, this works fine but....To take it a little further, is there a way to find the number of cursors contained in a form's dataenvironment by way of an array or some type of function? This way I could set up a loop through the array and change the path without hardcoding all the seperate statements.
>Thanks again,
>Jamie
>
>>You can put code into the DataEnvironment BeforeOpenTables event which re-sets the path. There have been several recent threads about this, and since you're PUTM, I suggest a search for ALL the info instead of a quick re-hash. You can add this code to your base form, and not have to update every form.
>>
>>HTH
>>Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform