Subject | Re: [IBO] Re: Changing the Not Null Constraint at run time |
---|---|
Author | Jason Wharton |
Post date | 2002-05-31T00:18:46Z |
Keep in mind, when doing ColumnAttributes changes, the affected
datasets/statements must be prepared fresh for them to be read.
ColumnAttributes are only taken into consideration at prepare time.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
datasets/statements must be prepared fresh for them to be read.
ColumnAttributes are only taken into consideration at prepare time.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "shahrambesharati" <besharati@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, May 30, 2002 5:08 PM
Subject: [IBO] Re: Changing the Not Null Constraint at run time
> Thank you for your response.
>
> As suggested, I used the REQUIRED/NOREQUIRED ColumnAttributes of the
> IBConnection
> in order to control the Nullability Constraint.
>
> I have tried the following codes(one at the time) to add Not Null
> constraint to a column called Currency but it does not change the
> attribute of the column.
>
> IB_Connection1.ColumnAttributes.Add('COUNTRY.CURRENCY=REQUIRED=TRUE');
> IB_Connection1.ColumnAttributes.Add('CURRENCY=REQUIRED');
> IB_Connection1.ColumnAttributes.LinkValues['CURRENCY']:= IB_REQUIRED;
>
> I appreciate you assistance.
>
> Shahram
>
>
> --- In IBObjects@y..., "Helen Borrie (TeamIBO)" <helebor@t...> wrote:
> > At 06:08 AM 30-05-02 +0000, you wrote:
> > >Hello,
> > >
> > >I like to change the ?Not Null? constraint for a field at run time
> > >using the SchemaCache.Requried but have been unsuccessful.
> > >
> > >Is it possible to Add/Delete the FieldName and TableName to
> > >SchemaCache.Requried or is this object only used to display Fields
> > >that have the ?Not Null? Constraint.
> > >
> > >I appreciate you help.
> >
> > Don't attempt to meddle with the Schema Cache - it is not intended
> for this.
> >
> > Set the REQUIRED ColumnAttribute of the column to False, at dataset
> level
> > or, if you need it multiple places, at the connection level.
> >
> > For more information, see the help text and also the "Working
> with.." TI
> > sheets on the TechInfo page.
> >
> > regards,
> > Helen Borrie (TeamIBO Support)
> >
> > ** Please don't email your support questions privately **
> > Ask on the list and everyone benefits
> > Don't forget the IB Objects online FAQ - link from any page at
> > www.ibobjects.com
>