Subject | Re: Master detail relationship, Masterlinks with date type |
---|---|
Author | moczaz |
Post date | 2004-08-12T09:17:01Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
whats happening behind the scenes when using IBO.
It seems I managed to get around my problem of using date columns
in MasterLinks by using the OnPrepareSQL event of TIB_Query.
I wrote an OnPrepareSQL event handler for the detail dataset, which
adds a WHERE clause to the detail query with
TIB_Query.AddSQLWhereClause . It seems to me that it acts like
the master/detail relationship I desired so much.
Thank you Helen.
Zsolt
> > > Try forcing the date columns to be cast as TDate. It stillwon't
> > > necessarily solve the problem, though, because a "raw" datelevel,
> >portion under
> > > the hood in Delphi and IBO is mm/dd/ccyy, whereas, at some
> >yourthrough as a
> > > dates are being changed to ccyy/mm/dd.
> >
> >What do you mean by forcing the date columns to be cast as TDate?
> >I think that setting up MasterLinks with date columns
> >(namely MasterLinks.Text:='WDATE=WDATE') causes the problem, but
> >I can't cast the columns here, can I?
>
> No; part of the trick would be to have the TIB_Column come
> TIB_ColumnDate, not a TIB_ColumnDateTime. But I think it's stillpossible
> that you'll bump into format problems unless *every* castinginside Delphi
> is done with AsDate, (not AsDateTime or Value or AsVariant) ANDyou avoid
> reading values from the controls. Experiment with it and use theThank you for your help, I will try IB_MonitorDialog to understand
> IB_MonitorDialog to watch the values that IBO sends through in the
> parameters to fetch the detail records.
whats happening behind the scenes when using IBO.
It seems I managed to get around my problem of using date columns
in MasterLinks by using the OnPrepareSQL event of TIB_Query.
I wrote an OnPrepareSQL event handler for the detail dataset, which
adds a WHERE clause to the detail query with
TIB_Query.AddSQLWhereClause . It seems to me that it acts like
the master/detail relationship I desired so much.
Thank you Helen.
Zsolt