Subject | [IBO] Re: Dynamic Master Detail SQL |
---|---|
Author | sdbeames |
Post date | 2007-08-04T07:17:23Z |
> >NULL expands to an int zero or a long zero. Unused pointers areTried it again....does not compute with any combination of
> >normally zeroed. There is no Nil that I know of.
>
> Try it. It's Delphi for "unassigned object".
capitalisation.... Using Nil in D7 didn't help the problem either.
> > > Do your controls know that they have to link through a differentAND the SQL of both queries of course.
> >datasource?
> >
> >Not sure what you mean here....my 2 grids stay linked to DataSource1
> >and DataSource2..... it's only the DataSource property of IBOQuery2
> >that we're playing with.....
> The TDatasource provides datalinking between a dataset andYou must be saying something different to what I'm hearing here.
> controls. How can it be that you mess around with the datasets and
> don't touch the datasources?
Can't you change the query's SQL and leave the DataSource property
alone? But anyway, I've been zeroing the Detail Query's DataSource
property, then resetting it after the SQL was changed. The problem
seems to be that the detail query is remembering the fields from the
first SQL query it executed, and then complaining when it can't fetch
them anymore because the master query SQL has changed, but only after
choosing a different master record. Is there another step needed to
clear the detail query's parameter list?
> The detail dataset's DatasourceYes, it always have been, except when I set it to zero before changing
> property has to point to the TDatasource that provides the
> datalinking for the master dataset.
the SQL, then it was reset to the same master DataSource as before.
> Another thing you might not have thought about is the persistentNah, no persistent fields setup. Very minimal test program.
> Fields[] objects...do you materialise those (TFields etc.) in your
> IDE? If so, your code will have to get rid of them as well....that
> alone could account for a large part of your problems.
Starting to look like I'll have to dynamically create & destroy the
queries to get it to work. Just seems odd though....
I presume that if you've tried it, you would have used a much newer
version of IBO, so maybe that's the difference. Ah well, thanks
anyway. Cheers.