Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting the name of the alias
Message
 
 
To
14/06/2001 13:34:09
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00519534
Message ID:
00519552
Views:
18
This message has been marked as the solution to the initial question of the thread.
Michel,
Instead of getting the members of the object, why not access the Alias property directly.
<b>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