Board index » delphi » Briefcase Model - How can you vertically filter XML?

Briefcase Model - How can you vertically filter XML?

With tables I use a lot for codes that hardly ever change I thought I would
cache them locally using the ADO load and save to xml. The problem is I only
want a portion of the data when I retrieve it and in a certain order. Using
SQL commands doesn't seem to work properly and using a filter and sort by
does but it means I end up with every column.

Is there a way around that, short of setting the visible properties of all
the other columns to false?

 

Re:Briefcase Model - How can you vertically filter XML?


Quote
>Is there a way around that, short of setting the visible properties of all
>the other columns to false?

There is no other way but why are you saving columns to XML that you don't need?

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Briefcase Model - How can you vertically filter XML?


Different views will use different subsets of data. Otherwise I have to save
lots of files to XML. That is a bit like asking why you don't do "select *
from" all the time isn't it?

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:l35mvtsnhiu89bb1kcag14upf776n26avd@4ax.com...

Quote

> >Is there a way around that, short of setting the visible properties of
all
> >the other columns to false?

> There is no other way but why are you saving columns to XML that you don't
need?

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:Briefcase Model - How can you vertically filter XML?


Quote
"Greg Nixon" <g...@nzcs.co.nz> wrote in message news:3bfa264c_2@dnews...
> With tables I use a lot for codes that hardly ever change I thought I
would
> cache them locally using the ADO load and save to xml. The problem is I
only
> want a portion of the data when I retrieve it and in a certain order.
Using
> SQL commands doesn't seem to work properly and using a filter and sort by
> does but it means I end up with every column.

> Is there a way around that, short of setting the visible properties of all
> the other columns to false?

Use TADODataSet to read in the XML disconnected recordset, and manually only
create field objects in the IDE for the columns you want to display.

For example, suppose you saved a recordset from the following query:

SELECT col1, col2, col3 FROM someTable WHERE col1 IS NOT NULL

and you wanted to open up the XML, but only use col1.  In order to do this,
you open up the XML, and manually create a field object in the IDE for col1.

I seem to recall this working for me, but it has been a while since I tried
it.  Let me know how it works.

Thanks.

Al

Other Threads