[fpc-pascal] Master Detail relationship in SQLdb

Michael Van Canneyt michael at freepascal.org
Fri Jul 13 17:08:57 CEST 2007



On Fri, 13 Jul 2007, Martin Schreiber wrote:

> On Thursday 12 July 2007 16.18, John wrote:
> [...]
> >
> > Another question (sort of related)
> >
> > The only way I have been able to get the query to 'read' the new
> > parameter value is to close and reopen the query.  Should this be so ?
> > This means it unprepares and then re-prepares the (same) query,
> > reallocates all the fields...  Is there not some way of just
> > re-executing the same prepared query with the new bound value(s) ?
> >
> > (I guess it means I could work around my problem by just modifying the
> > sql text each time, as I would have no additional overhead, but it seems
> > the "wrong way" to go about it!)
> >
> MSEgui has the component "tfieldparamlink" to implement master detail 
> relationship. In SVN trunk I just modified the tmsesqldb.refresh procedure 
> not to unprepare the SQL statement.
> If you need fast access to the lookup values you can use a "tdblookupbuffer".

Maybe a stupid question, but:

SQLDB has this already. 
So, why don't you help fixing SQLDB instead, and use that in MSEgui ? 
This way everyone benefits.

This is a lot of silly code duplication for no good reason...

Michael.



More information about the fpc-pascal mailing list