Hello Alan,

The domain check constraint is available, however, it is a custom
written check constraint, like for example:

CREATE DOMAIN ... 
CHECK (
VALUE IN ('Y', 'N')
)

This source can be found in the system tables, table RDB$FIELDS
column RDB$VALIDATION_SOURCE


With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!





Hi, can anyone help me with the following please?
As an example, I have a domain - YES_NO - with strangely enough only Y 
or N acceptable as input.
I then use this domain in various tables.
In Delphi I then check if 'Y' or 'N' is entered before trying to write 
to the database. Yes, I know the write will fail but I want to inform 
the user immediately on exit from the entry, rather than when getting to 
the final stage of data-entry, say clicking OK.
Instead of hard-coding (paraphrasing) "If entry is not in 'Y','N' try 
again", can I get the domain and the domain constraints available to me 
with some sql code? Such as "If entry is not in YES_NO.CHECK try again" 
substituting the real values....

I hope I've explained this.


Alan J Davies
Aldis


Reply via email to