Subject Re: [IBO] Getting field constraints from TIB_Query
Author Helen Borrie
At 12:26 PM 07-09-01 +0200, you wrote:
>Hello,
>I used to work with IBX to access my IB Database. Now I'm migrating to IBO.
>Because IBX Table and IBX Query both inherit from TDataSet I encounter a
>problem.
>I'm using TDataSet.Fields[x] to get hold of a fieldconstraint 'Required'.
>Since IBO Query and Table don't have a shared ancestor (dataset) I don't
>have access to the IBQuery.Fields[x] property.
>How can I obtain fieldconstraints from a IBOQuery is my question.

If you are using TIBOQuery, you are working with a TDataset descendant. All the methods and properties of TDataset are available. Instantiate the Field Objects just as in the native VCL, by right-clicking on the iboquery to display the Fields Editor, then right-click on that display and select Add All Fields. You will notice that the Required property is present, along with all the others you are used to.

regards,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________