Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field and Record validation with DBC Rules
Message
From
22/11/2001 07:22:47
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
To
22/11/2001 06:24:44
Sam Trenchard
System Support Services
London, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00584837
Message ID:
00584869
Views:
21
Sam the problem with alias() is that return the alias name not the table/view name if you do a use mytable alias something then the ALIAS() will return something and not my table.
for the rules error you are unable to suppress the messagebox but you can do an aerror to see if something has append.

>Thanks for reply to second point. I assume you mean I should check the current alias() against the return values from adbobjects(temp,'views') to trap a match.
>
>Is there any solution to trapping the rules/errors from the form as the standard error messagbox is ugly/inappropriate and not what I would expect in a use interface.
>
>>Hi Sam take a look to the ADBOBJECTS funtion and also the DBF function with this 2 you can get all the information that you whant.
>>
>>>I am trying to manage field validation on a form where the underlying DBC has field rules. I find that the rule fires before the valid method and does not seem to give any opportunity to intercept the error condition. The standard message offers a Revert option but does not refresh the control so the user
>>>has to re-enter the correct data.
>>>Related to this issue. I have tried using a local view for the datasource and calling a fieldvalidate method which uses DBGETPROP calls to fetch the ruleExpression and RuleText for the underlying fields/record. This seems to work OK but I am still trying to determine what type of datasource I have -
>>>Table, Localview or Remoteview. Is there a function call which returns this information for a given alias()?
Alexandre Palma
Senior Application Architect
Previous
Reply
Map
View

Click here to load this message in the networking platform