Subject | Re: [IBO] Master/detail don't work after set param manually |
---|---|
Author | Delmar Wichnieski (Delta Corporation) |
Post date | 2008-06-23T16:02:56Z |
>> Fix the logic of your workflow.My logic is correct, as I said, everything works correctly until to set the parameter manually. Also, I made a simple program to better isolate the problem, but the problem continues, then I suppose that is bug of that version.
For other hand, IBO4_8_7_Eval after "Files will be compiled and installed into the IDE's selected. Please be patient. This could take a while" imediatelly show the finish install wizard and don't show anything in IDE delphi 7.0 and also don't show any error message.
I'm selecting English Language from wizard install.
What I need to do for integrate into Delphi?
----- Original Message -----
From: Helen Borrie
To: IBObjects@yahoogroups.com
Sent: Friday, June 20, 2008 8:16 PM
Subject: Re: [IBO] Master/detail don't work after set param manually
At 05:19 AM 21/06/2008, you wrote:
>Hi friends
>
>In one form X I have this mater/detail and work well
>
> dmComum.QdblookAluno.Close;
> dmComum.QdblookAluno.ParamByName('COD_ALUNO').Clear; //clear the param COD_ALUNO
> dmComum.QdblookAluno.DataSource:=dmsem.dsQmatriculaSem; //set the master datasource
> dmComum.QdblookAluno.Open;
>
>In other form Y I have and also work well
>
> dmComum.QdblookAluno.Close;
> dmComum.QdblookAluno.DataSource:=nil; //clear the master datasource
> dmComum.QdblookAluno.ParamByName('COD_ALUNO').AsString:=dmq.Qbusca.FieldByName('CODIGO').AsString; // set the same parameter manually
> dmComum.QdblookAluno.Open;
>
>but after to use the form Y e come back to for X, the mater/detail of form X don't work, it seem do not actualize the param COD_ALUNO
>
>this is a bug of IBO4.7.16?
That build of IBO is a beta version from January 2007!!! It undoubtedly has serious bugs, although your problem comes from wrong logic in your application workflow. The current release is 4.8.7.
> What could I do to solve the problem...
Fix the logic of your workflow.
1. In a master/detail relationship, the master dataset "drives" the detail dataset. (The detail dataset does not drive the master).
2. In an IBO application, the datasets govern what happens in the visual interface. So, if you set the dmComum.QdblookAluno.DataSource property in one place, then go to another part of your application and change it (or set it to Nil) then the original relationship is broken.
It *is* possible for a detail dataset to be used with 2 different master sets, but not simultaneously. If you need to swap the master datasource when the workflow jumps from one form to another then you must take care of the swapping before the user gets his eyes on the form.
Helen
[Non-text portions of this message have been removed]