Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ampersand macro substitution & objects
Message
From
28/06/2006 10:36:54
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01132321
Message ID:
01132402
Views:
13
Yes :-) I had just gotten it to work, but your code is so much cleaner, and I don't think I need to check for PemStatus because it all happens in the form's init.

Thank you for your help & best regards

Peter

>How about:
>
>Local cCheckName AS String
>Scan
>   cCheckName = [Thisform.Pages1._page1.] + Alltrim(CheckBoxRules.Checkname)
>   WITH EVALUATE(cCheckName)
>        IF PEMSTATUS(EVALUATE(cCheckName),[cSqlString], 5)
>           .AddProperty([cSqlString],ALLTRIM(Rules))
>        ENDIF
>   ENDWITH
>ENDSCAN
>
>
>>Hi Boris,
>>
>>Some SQL statement stored in a table.
>>
>>I know I shold not put the & in front of Rules and I got a bit further with this
>>
>>
>>Local cSql As String,;
>>nResult As Integer,;
>>nAlias As Integer,;
>>cCheckName As String,;
>>cCheckAddProperty As String,;
>>cCheckSqlString AS String
>>
>>cSql = [Select * From X313CheckBoxRules]
>>nResult = SQLExec(lnSql,cSql,[CheckBoxRules])
>>nAlias = Select()
>>
>>Select CheckBoxRules
>>Scan
>>	cCheckName = [.] + Alltrim(CheckBoxRules.Checkname)
>>	With Thisform.Pages1._Page1
>>		cCheckAddProperty = cCheckName + [.Addproperty('cSqlString')]
>>		Try
>>			lRetVal = Evaluate(cCheckAddProperty)  && Executes ok!
>>			
>>			cCheckSqlString = cCheckName + [.cSqlString = ] + '[' + Alltrim(CheckBoxRules.Rules) + ']'
>>			lRetVal = Evaluate(cCheckSqlString)  && Error operator / operand type mismatch
>>		Catch To oException
>>			oException = Null
>>		Endtry
>>	Endwith
>>Endscan
>>Use In CheckBoxRules
>>
>>
>>
>>But I still get errors.
>>
>>
>>
>>
>>>>Can somebody please tell me what's wrong with this code?
>>>>
>>>>
>>>>Local cCheckName AS String
>>>>
>>>>Scan
>>>>   cCheckName = [.] + Alltrim(CheckBoxRules.Checkname)
>>>>   With Thisform.Pages1._page1
>>>>        ? &cCheckName                 && evaluates to _Check1 of type object
>>>>	&cCheckName..Addproperty('cSqlString',&Rules)    && Error
>>>>   Endwith
>>>>Endscan
>>>>
>>>>
>>>>I also tried &cCheckName.Addproperty('cSqlString',&Rules) with similar results.
>>>>
>>>>TIA & BR
>>>>
>>>>Peter
>>>
>>>What is Rules?
>>
>>Hi Boris,
>>
>>Some SQL statement.
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Reply
Map
View

Click here to load this message in the networking platform