SQL queries and datasets etc

J

John Dann

As only an occasional ado.net user I'm realising that there's
something important and basic that I don't understand:

I can obviously perform SQL queries on a database, but sometimes the
data I need to access is in a bare datatable. So the question is
whether there is a mechanism for performing a query directly on a bare
datatable or, failing that, if add the table to a temporary dataset
will that do? Or do I need to go the whole hog and integrate it into a
full database?

(In VB.Net if it makes any difference)

Thanks
JGD
 
J

John Dann

What you mean bare database?

I don't think I wrote that but bare _datatable_ (unless I've missed a
typo), by which I meant a datatable created directly in code (ie

Dim dt as datatable

)

and then populated directly to hold some transient data.

JGD
 
N

Norman Yuan

There is no fully functional SQL language you can use on DataTable object,
as you do on a real database. But there is light version of similar thing
available: check out DataTable.Select() method or get a DataView object on
the said DataTable and use DataView.RowFilter property.
 
G

Guest

John,

You might be interested in the assembly I've been working on at
http://www.queryadataset.com. It lets you perform complex SQL SELECT
statements including UNION, JOINS, GROUP BY, HAVING, ORDER BY, sub-queries,
etc against the tables in a dataset.

The web-site allows you to upload your own XML data fragment, DataSet or
resultset and issue queries using the QueryADataSet assembly.

Adrian Moore
http://www.queryadataset.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top