Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FieldBeingValidated()
Message
From
20/06/2002 03:26:23
 
 
To
18/06/2002 15:31:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00669872
Message ID:
00670487
Views:
29
Bill,

I take it you want you want to put this rule onto the table with the 'check' clause.

Can't you just pass in the name of the field into your field_valid?

For example:

*--Apply the check clasue
ALTER TABLE myTable
ALTER COLUMN myColumn SET CHECK Field_Valid(myColumn)


PROCEDURE Field_Valid
LPARAMETERS tcFieldName

DO CASE..

Personally, I don't favour this approach as I like to separate business logic out of the database. This makes it easier to port your application onto other databases etc.

Mace



>I would like my field-level rules to all be identical "Field-Valid()".
>
>Procedure Field_Valid()
>  local lcField
>  lcField = FieldBeingValidated()
>  do Case
>    Case lcField = 'F1'
>      .....
>    Case lcField = 'F2'
>      .....
>    .....
>  EndCase
>EndProc
>
>Procedure FieldBeingVAlidated()
>  ?????
>EndProc
>
>Does anyone have any ideas on the code for FieldBeingValidated()?
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform