Subject RE: [IBO] programatically setting search-criteria
Author Josipovic, Nick
Thanx Geoff for the good explanation.
Having looked into the IBO-Sources a bit I think I will stick by the
parsing-solution Adreas suggested before. Although not very comfortable, it
is still more painless than a direct solution into the datalinks :-)

Nick Josipovic
Corporate Market Intelligence

Phone: ++49 6227 762945


> -----Original Message-----
> From: Geoff Worboys [mailto:geoff@...]
> Sent: Tuesday, September 18, 2001 2:33 AM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] programatically setting search-criteria
>
>
> > Thanx.....writesearch and readsearch work for me.
> > Isn't there a way to acess the fields of a query
> > directly, as it would save me lots of parsing and
> > string-formatting work?
>
> The search criteria are actually stored in the datalinks and NOT in a
> column buffer (since there is no actual row in existance during search
> mode).
>
>
> > What does the CTL stand for? It seems to be fix for
> > any query in every application. Perhaps Jason would
> > like to explain....
>
> In "normal" interactive mode each control (using its own FieldDataLink
> instance) places its defined search criteria into the dataset by name
> using the following code...
>
> if not Assigned( Control ) then
> Result := ''
> else if not Assigned( Control.Owner ) then
> Result := 'CTL.' + Control.Name
> else
> Result := 'CTL.' + Control.Owner.Name + '.' + Control.Name;
>
>
> So 'CTL.' is just a literal to indicate reference to a module.control
> by name. To build the search criteria programmatically you must use
> the same format in your entries.
>
> If you had built your own datalink you could use a different
> mechanism. Indeed depending on your circumstances you could do
> exactly that. Create your own datalink (overriding the
> GetSearchEntryName and DoPrepareSQL according to your own
> requirements) and then instantiate datalink(s) on your form.
>
> I have not tried this, but if you study IB_FieldDataLink.pas (and how
> it uses SearchBuffer) I suspect there may be a way you can setup your
> own search criteria that does not involve reference to control
> instances.
>
>
> Maybe this gives you some ideas?
>
> Geoff Worboys
> Telesis Computing
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Get VeriSign's FREE GUIDE: "Securing Your Web Site for
> Business." Learn about using SSL for serious online security.
> Click Here!
> http://us.click.yahoo.com/LgMkJD/I56CAA/yigFAA/PhFolB/TM
> --------------------------------------------------------------
> -------~->
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>