Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FieldBeingValidated()
Message
De
20/06/2002 03:26:23
 
 
À
18/06/2002 15:31:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00669872
Message ID:
00670487
Vues:
28
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform