Subject | RE: [IBO] Updating left outer join |
---|---|
Author | Paul Hope |
Post date | 2006-06-05T13:25:04Z |
I solved it using OnCustomEdit and a separate DSQL. Problem was I could
not edit the grid without the EditSQL in place, so I left it there and
crippled it with 'where rec = -1'.
This raises two questions
Should IBO have supported what I was doing below?
How do you use OnCustomEdit, make the grid editable and not have a crippled
statement in the InsertSQL?
Regards
Paul
not edit the grid without the EditSQL in place, so I left it there and
crippled it with 'where rec = -1'.
This raises two questions
Should IBO have supported what I was doing below?
How do you use OnCustomEdit, make the grid editable and not have a crippled
statement in the InsertSQL?
Regards
Paul
> -----Original Message-----
> From: IBObjects@yahoogroups.com
> [mailto:IBObjects@yahoogroups.com] On Behalf Of Paul Hope
> Sent: 05 June 2006 13:09
> To: IBObjects@yahoogroups.com
> Subject: RE: [IBO] Updating left outer join
>
> Hi Helen
>
>
> > -----Original Message-----
> > From: IBObjects@yahoogroups.com
> > [mailto:IBObjects@yahoogroups.com] On Behalf Of Helen Borrie
> > Sent: 05 June 2006 12:57
> > To: IBObjects@yahoogroups.com
> > Subject: Re: [IBO] Updating left outer join
> >
> > At 09:42 PM 5/06/2006, you wrote:
> > >Hi
> > >
> > >I have this query connected to a grid
> > >
> > >select s.rec,s.shipment,s.whs,s.pid,s.qty,s.alloc,w.description
> > >from (warehouses w left outer join shipment_allocations s
> > > on s.whs=w.ref and s.shipment=:shipment and s.pid=:pid)
> > >
> > >in the EditSQL I have
> > >
> > >execute procedure shipment_alloc_edit(:shipment,:pid,:qty,:whs)
> > >
> > >:shipment comes from MasterParams and MasterSource :qty is
> > entered in
> > >the grid :pid is set in code AfterPrepare (ParamByName) :whs
> > is one of
> > >the fields extracted in the SQL
> > >
> > >When I look at the SQLMonitor I see that when the query is
> > opened both
> > >:shipment and :pid are correctly set. However when the
> InsertSQL is
> > >executed :shipment and :qty are set, but :pid and :whs are null.
> > >
> > >How can I persuade it to pick up :pid and :whs?
> >
> > Try improving the syntax for the main query:
> >
> > select s.rec,s.shipment,s.whs,s.pid,s.qty,s.alloc,w.description
> > from warehouses w
> > left outer join shipment_allocations s
> > on s.whs=w.ref
> > WHERE s.shipment=:shipment and s.pid=:pid
> >
> > Helen
> >
> That breaks it, I always want the grid populated with fields
> from warehouses even when there is no data in
> shipment_allocations. Changing it as you suggest returns no rows ;-(
>
> Regards
> Paul
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> You can search right from your
> browser? It's easy and it's free. See how.
> http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/PhFolB/TM
> --------------------------------------------------------------
> ------~->
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups Links
>
>
>
>
>
>