Newbie: How to use SQL queries against Dataset tables

  • Thread starter Thread starter Kerry
  • Start date Start date
K

Kerry

Hi,

I have loaded a dataset with several tables parsed from an XLM source.

I can't seem to find an example of how to run SQL queries against these
tables to create more tables in the same dataset.

(I'm trying to port an old access app to .Net.)

Thanks,

Kerry
 
Thanks for the reply.

I'm doing sales reports. I used to export data from the accounting system
via excel and after some cleanup into Access.

Now I'm using the accounting products SDK to get the same base data via XML.
This is what I already have loaded into the dataset tables.

If I'm understanding you, dastasets are good for holding and editing data on
the client side but I need to push the tables out to jet, SQL server or
MSDE to create new tables columns with totals etc. (the way I did in
Access).

Kerry
------
 
No, you CAN create new client-side columns and these can contain expressions
to contain totals--and all with ADO.NET and without need of a SQL Engine.

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Kerry,

If there is a way to do this in ADO, it's not going to be
pretty. The only SQL command functionality (that I know
of) in ADO is the Datatable.Select method, however this is
strictly a filter expression and cannot create new columns.

If you want to do SQL commands the way you're used to, you
should get your data into a data source that one of the
many .NET data providers can access via OleDb or SqlClient
classes.

Are you stuck with the XML file as your source? It would
ba a shame have to turn around and load up an Access
database with your dataset (although this is easily done).

I'll be interested to hear if someone else knows a way to
meet your original requirement.

Randy
-----Original Message-----
Thanks again for your time. I may not be explaining myself well.

This is the kind of suff I need to do:

SELECT JustSales2001.Name, Sum(JustSales2001.Amount) AS [$2001Sales] INTO
tbl2001Sales
FROM JustSales2001
GROUP BY JustSales2001.Name
ORDER BY JustSales2001.Name;

I know how to add cols and do expressions based on cols in a given record.
Is the SUM, GROUP BY, ORDER BY functionality available some where in ADO
without the use of a SQL Engine?

Kerry
-----------------

No, you CAN create new client-side columns and these
can contain
expressions
to contain totals--and all with ADO.NET and without need of a SQL Engine.

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties,
and confers no
rights.
__________________________________
the accounting
system
same base data via
XML.
holding and editing
data
on JET/Access) so it
can't
parsed from an XLM
source.
queries against
these


.
 
Back
Top