Subject RE: [IBO] FieldReadonly
Author Alan McDonald
thanks geoff, paul,
I just cleared and reset the sql onprepare - it works fine
but I think the re-prepare after setting fieldsreadonly otion would have
worked to (didn't try that)


Alan

> -----Original Message-----
> From: Paul Vinkenoog [mailto:paul@...]
> Sent: Wednesday, 21 May 2003 12:14 PM
> To: IBObjects@yahoogroups.com
> Subject: RE: [IBO] FieldReadonly
>
>
> Hi Alan,
>
> Nice to follow your little solo conversation ;-)
>
> > ok, can I assume then, that since I have custon update SQL for my
> > query and a column is included in the update, that the setting of
> > readonly for that column is ignored?
>
> I don't have IBO or the IBO Help handy but I think...
>
> ...that the update SQL is not a problem as long as you protect the
> column against updating at the IBO level (the update SQL will then
> just set the existing value for the field in question).
>
> ...that trying to set ReadOnly via the TIB_Column (which you get from
> FieldByName) is not the right way. I even suspect that TIB_Column's
> ReadOnly property is a read-only property ;-)
>
> ...that you should do this through the FieldsReadOnly property of
> the dataset, like this:
>
> with MyQuery.FieldsReadOnly do
> begin
> if BlokeIsAdmin
> then LinkValues[ 'MyTable.ThisColumn' ] = 'F';
> else LinkValues[ 'MyTable.ThisColumn' ] = 'T';
> end;
>
> You might need to (un- and/or) reprepare if you do this.
>
>
> Good luck,
> Paul Vinkenoog
>
>
>
>
>
>
>
>
> __________________________________________________________________
> _________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> __________________________________________________________________
> _________
> http://www.ibobjects.com - your IBO community resource for Tech
> Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>