Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Alias does not exist
Message
From
25/04/2022 21:19:33
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01684254
Message ID:
01684268
Views:
25
>>Hi,
>>
>>Could someone suggest why I am having a problem (actually not me but the customer) in the following segment of code:
>>
>>The container with the text box has a property control_source. This property has a value V_WORK.EMPLOYEE
>>
>>The code then checks is the value of the field EMPLOYEE in the cursor V_WORK has been change. Here is the code:
>>
>>
>>		cControlSource = ALLTRIM( this.control_source )
>>		IF EVALUATE( cControlSource ) == OLDVAL( cControlSource )		
>>			RETURN .T.
>>		ENDIF 
>>
>>
>>The problem occurs on the line above, EVALUATE( cControlSource ) == OLDVAL( cControlSource ), and it does
>>ALIAS IS NOT FOUND. I verified that the entry in .control_source exists as described above.
>>
>>TIA.
>>
>>UPDATE. the following code checks that the alias V_WORK exist and is open. This code, below, is before the code above (just in case someone wonders if the alias is indeed exists and open
>>
>>
>>IF !EMPTY( this.control_source )
>>	cAlias = SUBSTR( ALLTRIM(this.control_source), 1, AT('.',ALLTRIM(this.control_source)) - 1)
>>	IF SELECT( cAlias ) > 0
>>		cControlSource = ALLTRIM( this.control_source )
>>		IF EVALUATE( cControlSource ) == OLDVAL( cControlSource )		
>>			RETURN .T.
>>		ENDIF 
>>      ENDIF
>>ENDIF
>>
>
>If someone has a test code (any kind of bogus code) that would generate an error
>
>ALIAS IS NOT FOUND
>
>I would appreciate it!

Is it possible the error actually is [ALIAS '' IS NOT FOUND] i.e. it's a blank/empty alias/work area?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform