Subject | Re: [IBO] Any answer?... Also, can you add this bugfix? |
---|---|
Author | IBM T |
Post date | 2001-10-30T08:59:16Z |
It's a 'side effect' of my 'enhancement' :) .
You cannot reproduce this because in the old (official) code of TIBODataset,
the pressence of _any_ design-time field cuts down the native IBO engine
which deals (assingns) the field's displaying attributes.
What I have done with the TFieldOptions is the possibility to 'drag' the
field display attrs from a server-centric repository (ie. the IBO native
'links') in the specific design-time assigned fields of each dataset. So,
when the engine tried to process a fkCalculated or a fkLookup field (which,
naturally, isn't present in the repository) an error occured.
The [foAutoAppendAll] flag is designed to give a dynamic character to
TDataset.Fields, auto-updating them as necessary. In this way, we have (at
design time) the 'bussines fields' allowing us to use them in our code,
since the 'data fields' (for user informational purposes mainly) are
assigned dynamically at run-time. This overcomes a problem which I had with
all TFields based datasets (especially with IBX due the number of tables &
fields) where I had, let's say, 1000 queries 'select * from t1' which I must
update when I add/modify a field in 't1'... (You can search for 'IBX
walkings' in ibexpress NG archive...)
Of course, the test can be done also as if Fields[ii].FieldKind<>fkData then
Continue; (BTW, IMHO I think that's better... but, you see, in IBX some
fields which are present in SQL are fkInternalCalc (I think that the
server-calculated ones but I'm not pretty sure.) )
HTH
""Jason Wharton"" <jwharton@...> wrote in message
news:0e8701c160c8$5bb4dd30$7b22579f@CX170673E...
You cannot reproduce this because in the old (official) code of TIBODataset,
the pressence of _any_ design-time field cuts down the native IBO engine
which deals (assingns) the field's displaying attributes.
What I have done with the TFieldOptions is the possibility to 'drag' the
field display attrs from a server-centric repository (ie. the IBO native
'links') in the specific design-time assigned fields of each dataset. So,
when the engine tried to process a fkCalculated or a fkLookup field (which,
naturally, isn't present in the repository) an error occured.
The [foAutoAppendAll] flag is designed to give a dynamic character to
TDataset.Fields, auto-updating them as necessary. In this way, we have (at
design time) the 'bussines fields' allowing us to use them in our code,
since the 'data fields' (for user informational purposes mainly) are
assigned dynamically at run-time. This overcomes a problem which I had with
all TFields based datasets (especially with IBX due the number of tables &
fields) where I had, let's say, 1000 queries 'select * from t1' which I must
update when I add/modify a field in 't1'... (You can search for 'IBX
walkings' in ibexpress NG archive...)
Of course, the test can be done also as if Fields[ii].FieldKind<>fkData then
Continue; (BTW, IMHO I think that's better... but, you see, in IBX some
fields which are present in SQL are fkInternalCalc (I think that the
server-calculated ones but I'm not pretty sure.) )
HTH
""Jason Wharton"" <jwharton@...> wrote in message
news:0e8701c160c8$5bb4dd30$7b22579f@CX170673E...
> I've tried to duplicate this bug but I am unable to.InitFields
> Are you doing anything special?
> I was thinking that a check for FieldKind fkData would be a good way to
> isolate this.
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "IBM T" <vatt@...>
> Newsgroups: egroups.ibobjects
> To: <IBObjects@yahoogroups.com>
> Sent: Sunday, October 28, 2001 12:23 AM
> Subject: [IBO] Any answer?... Also, can you add this bugfix?
>
>
> > Hi,
> >
> > The TIBODataset throws an exception when we have a call of the
> > with design-time fields which aren't in the table (ie. client-calculated___________________________________________________________________________
> > fields, lookup fields). The code:
> >
> >
> > procedure TIBODataset.InitFields;
> > var
> > ii: integer;
> > tmpCol: TIB_Column;
> > tmpField: TField;
> > begin
> > for ii := 0 to FieldCount - 1 do
> > begin
> > tmpField := Fields[ii];
> > tmpCol := InternalDataset.Fields.BySQLNo( tmpField.FieldNo - 1 );
> > <--~------- exception here when tmpField.FieldNo = -1
> > if tmpField.FieldName = tmpCol.BDEFieldName then
> > begin
> > ...
> >
> > The fix, IMHO, is quite obvious. A solution:
> >
> > procedure TIBODataset.InitFields;
> > var
> > ii: integer;
> > tmpCol: TIB_Column;
> > tmpField: TField;
> > begin
> > for ii := 0 to FieldCount - 1 do
> > begin
> > if Fields[ii].FieldNo < 1 then Continue; <--~------- the line which
> > should be added
> > tmpField := Fields[ii];
> > tmpCol := InternalDataset.Fields.BySQLNo( tmpField.FieldNo - 1 );
> > if tmpField.FieldName = tmpCol.BDEFieldName then
> > begin
> > ...
> >
> > For these small suggestions, please tell me if I can count on them to
> > contiune my applications
> >
> > HTH
>
>
>
>
>
> IB Objects - direct, complete, custom connectivity to Firebird orInterBase
> without the need for BDE, ODBC or any other layer.___________________________________________________________________________
>
> http://www.ibobjects.com - your IBO community resource for Tech Infopapers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>