Subject | Re: [IBO] Locate and Master Detail |
---|---|
Author | wayne |
Post date | 2002-12-19T19:17:24Z |
mmm, maybe I am confused,,, Jason who else ,, DEFINETLY it can not be you.
You have helped me in the PAST,, I never actually thanked you.
I am thankfull and appreciate all the help from you, and Helen and all the
rest.
My problem is this I guess. ::
My TIB_Queries is "select * from client_account"
It does not have a Parameter so when opened it gets all the data accross
the wire (" I assume "). This is what I would like to avaoid.
Is this statement correct ?
I use the same Form for Insert and Edit.
file://------------------------------------------------------
The difference being when *Editing*
I Do :
(1)
qryAcc.prepare;
qryEnq.prepare;
(2)
if qryAcc.Locate('ID', id, []) then
begin
qryAcc.Edit;
qryEnq.Edit;
qryAcc.edit is opened and has an id of say (10)
qryEnq.Edit; is opened and does no have an ID of 10 **ERROR***
qryAcc and qryEnq are related "master detail 1:1".
file://------------------------------------------------------
When *Inserting* I Do
(1)
qryAcc.prepare;
qryEnq.prepare;
(2)
begin
qryAcc.Insert;
qryEnq.Insert;
""Jason Wharton"" <jwharton@...> wrote in message
news:00e301c2a78c$0d873520$dc756a41@CX170673E...
You have helped me in the PAST,, I never actually thanked you.
I am thankfull and appreciate all the help from you, and Helen and all the
rest.
My problem is this I guess. ::
My TIB_Queries is "select * from client_account"
It does not have a Parameter so when opened it gets all the data accross
the wire (" I assume "). This is what I would like to avaoid.
Is this statement correct ?
I use the same Form for Insert and Edit.
file://------------------------------------------------------
The difference being when *Editing*
I Do :
(1)
qryAcc.prepare;
qryEnq.prepare;
(2)
if qryAcc.Locate('ID', id, []) then
begin
qryAcc.Edit;
qryEnq.Edit;
qryAcc.edit is opened and has an id of say (10)
qryEnq.Edit; is opened and does no have an ID of 10 **ERROR***
qryAcc and qryEnq are related "master detail 1:1".
file://------------------------------------------------------
When *Inserting* I Do
(1)
qryAcc.prepare;
qryEnq.prepare;
(2)
begin
qryAcc.Insert;
qryEnq.Insert;
""Jason Wharton"" <jwharton@...> wrote in message
news:00e301c2a78c$0d873520$dc756a41@CX170673E...
> Your request is confusing to me.___________________________________________________________________________
> How do you expect to Edit a record if the dataset isn't opened?
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
> -- We may not have it all together --
> -- But together we have it all --
>
>
> ----- Original Message -----
> From: <waynef@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Wednesday, December 18, 2002 12:30 AM
> Subject: [IBO] Locate and Master Detail
>
>
> > I have two TIB_Queries
> > set up in a Master Detail.
> >
> > I then do a locate on the master Query
> > and if found
> >
> > I put the Master in Edit mode, then the detail in
> > edit mode ( 1:1 relation ).
> >
> > My problem is that the Detail never goes into edit mode.
> > so it seems I have to do a locate on that query as well
> >
> > Here are the details
> >
> > (1)
> > qryAcc.prepare; // Open
> > qryEnq.prepare; // Open
> >
> > (2)
> > if qryAcc.Locate('ID', id, []) then
> > begin
> > qryAcc.Edit;
> > qryEnq.Edit;
> >
> >
> > I have noticed that if I do not use prepare but Open,,
> > it works ...
> >
> > waht is the best way of doing this, I would hate to have to use
> > 'OPEN'.
> >
> > Thanks
> > Wayne.
>
>
>
>
>
> IB Objects - direct, complete, custom connectivity to Firebird orInterBase
> without the need for BDE, ODBC or any other layer.___________________________________________________________________________
>
> http://www.ibobjects.com - your IBO community resource for Tech Infopapers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>