Derive check constraint column using adSchemaCheckConstraints

From: onedaywhen (onedaywhen_at_fmail.co.uk)
Date: 03/29/04


Date: 29 Mar 2004 08:35:50 -0800

I create two Jet 4.0 tables like this:

CREATE TABLE Species1 (Gender CHAR(1), CONSTRAINT ck__1 CHECK (Gender
IN ('F','M')))
;
CREATE TABLE Species2 (Gender CHAR(1), CONSTRAINT ck__2 CHECK (Gender
IN ('F','M')))
;

I then open a results set using ADO's OpenSchema method with
adSchemaCheckConstraints for the Schema argument. I get two rows
containing the following:

CONSTRAINT_CATALOG=Null
CONSTRAINT_SCHEMA=Null
CONSTRAINT_NAME=ck__2
CHECK_CLAUSE=Gender IN ('F','M')
DESCRIPTION=Null

CONSTRAINT_CATALOG=Null
CONSTRAINT_SCHEMA=Null
CONSTRAINT_NAME=ck__1
CHECK_CLAUSE=Gender IN ('F','M')
DESCRIPTION=Null

>From the results how would I deduce (other than from the constraints'
names) from which table the each Gender column derives?

Thanks.

--