Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting the name of the alias
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00519534
Message ID:
00519558
Views:
17
Typo alert! Too much bold.

We need the ability to Edit our own posts.

>Michel,
>Instead of getting the members of the object, why not access the Alias property directly.
>local locursor
>IF AMEMBERS(laCursor,ThisForm.DataEnvironment,2)>0
>   FOR lnCompteur=1 TO ALEN(laCursor)
>      locursor = EVAL("ThisForm.DataEnvironment."+laCursor[lnCompteur])
>      if vartype(locursor) = "O" ;
>         and upper(locursor.BaseClass) = "CURSOR" then
>         * object is not a relation so you can
>         * process Alias property of locursor object
>      endif
>   NEXT
>ENDIF
>
>HTH.
>
>>I'm looking for the easiest way to detect the name the alias of all my cursor in the data environment.
>>
>>I have something like this to scroll thru all the entries:
>>
>>
>>IF AMEMBERS(laCursor,ThisForm.DataEnvironment,2)>0
>>   FOR lnCompteur=1 TO ALEN(laCursor)
>>      lcExec='ThisForm.DataEnvironment.'+laCursor[lnCompteur]
>>      =AMEMBERS(laCursor2,&lcExec)
>>      IF laCursor2[1]='ALIAS'
>>         * We have an alias
>>         * We can add the code here to do some process
>>      ENDIF
>>   NEXT
>>ENDIF
>>
>>
>>So, basically, is that the proper approach? Also, once I am on an alias, what is the easiest way to detect the alias name?
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform