Page 1 of 1

Try to resolve this

Posted: Thu 08 Sep 2005 09:06
by smux
Hello, try to resolve this:

There are a Table, example: TBL_1 whit three fields:

TBL_1
Fld1,
Fld2,
Fld3

How to introduce a constraint that do that one and only one of the fields have got data,
the other fields have to be empty.

Ex correct:

TBL_1 --> NULL,NULL,1
NULL,1,NULL
1,NULL,NULL

Ex incorrect (this haven't to happened):

TBL_1 --> 1,1,NULL
1,1,1
NULL,NULL,NULL

Posted: Thu 08 Sep 2005 14:40
by Ikar
You can get this functionality on client side by using TDataSet.BeforePost event or on server side by using triggers