Thanks for the link and your time.  I have only three simple questions.

1. Does the relation of the parent and child have to be based on numbers?  I 
ask this because of the fact that a primary key must be a number currently.  
I was not able to determine the data type from your example.

2. I noticed the indexdefs was set on the sqlquerys on your forms.  It appears 
that indexdefs is a list (array?).  But is it used?  If is is used - how is 
it used?

3. I noticed that the child relation is moved/set in the code. The code below 
is the example from your code. And wonder if this is required or there was 
some other reason. I would have expected sqlquery2 (child) to follow 
sqlquery1 (parent).

procedure TFBedrijven.QBedrijvenAfterScroll(DataSet: TDataSet);
begin
  SaveData;
  with QRelaties do
    begin
    if Active then close;
    Params.ParamByName('bedrijfid').asinteger := 
Dataset.fieldbyname('bedrijfid').AsInteger;
    open;
    end;
end;

procedure TFBedrijven.QRelatiesAfterInsert(DataSet: TDataSet);
begin
  
Dataset.FieldByName('bedrijfid').Assign(QBedrijven.fieldbyname('bedrijfid'));
end;

John
  
On Thursday 30 March 2006 01:27, Joost van der Sluis wrote:
> You could implement Master-detail in sqldb, or look at an example here:
> http://www.cnoc.nl/fpc/pgg/
>
> That program is written for a sort of demonstration we've had here in
> the Netherlands. (It's in Dutch, but I suppose you can sort it out, the
> code is in the .tgz file)
>
> On Thu, 2006-03-30 at 00:12 -0800, johnf wrote:
> > Hi,
> > Could someone explain how to setup a Master Detail using the SQLdb or a
> > link to something explaining what to do.
> >
> > John
> >
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to