Post
by Jeff Luther » 23 Mar 2007, 01:48
Posted by: Jeff Luther
Is your DataSet 'wishful thinking' or are you really missing that feature? I
ask because I'm not so sure that it isn't (sort of) available already. Click
on my link below, click on Samples and go to the XML DEMOS area. I show:
- a dynamic table window (TW) populated by a query.
- an XML file generated from those data.
(You could also write a TW class that would be able to build itself dynamically,
based on the tokens defined in the first row of a CSV file, too. And once
defined, pop. the TW with all the CSV data. Just a SMOP (Small Matter Of
Programming) is all it would take.)
And hey, you want it 'non visual'? Just SalHideWindow() on SAM_Create! And
with a dynamic TW you don't have to know the result set beforehand, you can
use the SalTbl functions to access each column and get title, pull data from
each row, etc. Look at my demo -- all the source is there for doing that.
Now passing the hWnd of your populated TW in your 2nd paragraph might not be
so straight-forward, depending, if you redefine your TW data into something
that could be passed on -- a flat file, memory data structure, XML file --
then that might work too.
I just found this page: http://support.microsoft.com/kb/319180
titled: "How to transform a DataSet to spreadsheet XML for Excel...
and see that that's basically what my XML demo does, code complete and it's
even Free of Charge!
Best Regards,
Jeff @ PC Design
info: www.JeffLuther.net/gupta/