Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Codebook 3.0 - Handling Error 1582
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00020220
Message ID:
00020325
Views:
38
>Mr. Griver,
>
>I have purchased and studied the ³Visual FoxPro 3 Codebook.² After many hours of personal study and the invaluable help of ³Codebook 3 Step-by-Step² and ³Codebook for Mere Mortals,² I have made great progress toward creating my first Codebook application. I would like to thank you for creating this robust methodology
>
>I have run into a problem and discovered a work around that I would like your thoughts on. I am using the business objects and forms which have been updated to accept one-to-many relationships, but I have not found a difference to the original forms when addressing this issue. Also, I am using VFP 5.0. My situation is as follows:
>
>I am using local views to access a customer table. I have created a field validation rule, on the clastname field of the view, which reads:
>
>!empty(lv_customer.cLastName)
>
>The rule text is:
>
>³The Last Name cannot be empty.²
>
>In the errorfieldruld method of ebizobj in CBIZED.VCX, I get an error on the DbGetProp() call because lcField has a value of ³The Last Name cannot be empty.²
>
>The value of lcField is set by the statement:
>lcField=laError[AERROR_ PARAMETER]
>where AERROR_PARAMETER is 3.
>
>Of course, lcField must contain ³cLastName² for the DbGetProp() call to work.
>
>Have you encountered this problem? My work around has been to assign the value of the field validation text to the name of the field (³cLastName²) in the view. The DbGetProp() call retrieves the value of the field validation text from the database, not the view, so this is the text which is displayed. This solution requires no modification to the class code. Optimally, the rule and the text would only be entered once, in either the view or the database, not disjointedly in both.
>
>I have been unsuccessful (personally and through queries to the Universal Thread) in finding a function which will return name of the field whose validation rule has been violated. The other workable solution was to include the field name in the rule text and parse it our. Like my solution, this would require careful coordination. Additionally the class code would need to be modified.
>
>Thank you for your attention. I greatly appreciate any thoughts you would share.
>
>Regards,
>Jeff Sliwa


Hi Jeff,

I am not Yag... but I might have something to offer. The following message comes from the CompuServe FoxUser forum, section 9, where you'll find the best support for Codebook.

Hope this helps.

José
------------------------------------------------------------------
FORWARDED MESSAGE - Orig: 22-Nov-96 21:18
Subject: CB3 under VFP5 - Msg Number #218700
From: Richard R. Hawkins, 71024,3240
To: Dan Welter [SKAMP] 74464,2557
Forum: FOXGANG Section: 09 - 3rd Party Products
------------------------------------------------------------------

Dan -

Talked to Microsoft again today about the AERROR parameter and the impression I got was that
a fix (if any) would be a while in coming (a patch?, next version?). I decided to keep the
field-level rules in my apps, but used the following work-around:

1. Field-Level Rule messages now contain name of the field responsible for the error, a
colon, and the error message. For example, "CCODE:The code cannot be empty"

2. In the field-level error handler method in CB3, I separate the field name from the message
and use both where appropriate in the existing codebook code.

It seems to work so far - though the error messages outside of the app now have the field
name in them.

Best -

Rick Hawkins
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform