Subject Re: [IBO] RE: Problems with TDBLookupComboBox and IBO_Objects v4.0
Author zorro@digital-u.com
Ok, Let see if I can explain. It seems one of the feature/fix in
version 4 over 3.6x was checking dialect 3 field names in that you no
longer had to surround fieldname with quotes. eg("UserName"). This
all works fine except for the function that locate a record. Whenever
the DataSet.Locate function(TDBLookupComboBox called this function)
is called it does not check to see if the fieldname is dialect 3. So
a fieldname of UserName would be sent as USERNAME. This will produce
the error message field not found.

I hack the source to fix my problem, however my hack is not a good
one has it assume all fieldnames are dialect 3..

Source taken from IBODataset.pas

function TIBODataset.Locate( const KeyFields: string;
const KeyValues: Variant;
Options: TLocateOptions ): Boolean;
var
tmpKeyFields: string;
begin
tmpKeyFields := '"' + cvLitCriteria( KeyFields, '"' )
+ '"'; //Added by Paul
Result := LocateRecord( tmpKeyFields, KeyValues, Options, true,
false );
// Result := LocateRecord( KeyFields, KeyValues, Options, true,
false );
if Result then
DoAfterScroll;
end;



--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> I missed some of the details on this.
> Please fill me in on what is going on here.
> If you give me the details I am pretty sure I can provide a quick
fix for
> you to try.
> In fact, be brave and make a change in the sources to suit your
needs if you
> like.