473,488 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I use real SQL on a DataTable? i.e. not array of rows using a filter... as in DataTable.Select

How can I use real SQL on a DataTable? i.e. not array of rows using a
filter... as in DataTable.Select.

I read at : microsoft.public.dotnet.framework.adonet

"As others have posted: There is no SQL query processor for DataSets. You
can use XPath with an XMLDataDocument built from the DataSet. You can also
perform selections based on criteria, using the Find and
Select methods, and you can create row filters using DataViews."

Is this true?
Nov 16 '05 #1
3 5169
yes RowFilters are VERY powerful and more similar to what you might be
looking for ..

xpaths are also very powerful.

neither is "real" sql though.

"Dan V." <da**@yah.com> wrote in message
news:Os***************@TK2MSFTNGP12.phx.gbl...
How can I use real SQL on a DataTable? i.e. not array of rows using a
filter... as in DataTable.Select.

I read at : microsoft.public.dotnet.framework.adonet

"As others have posted: There is no SQL query processor for DataSets. You
can use XPath with an XMLDataDocument built from the DataSet. You can also
perform selections based on criteria, using the Find and
Select methods, and you can create row filters using DataViews."

Is this true?

Nov 16 '05 #2
After reading some articles I have a better idea.

I basically am creating a utility for myself that allows one to run a SQL
query or Filter on every table in every database in a path (including
subfolders if desired). It basically will be used mostly to find table
names and column names that match a pattern. When at least one row is found
it displays the 'table' in a DataGrid and has a next or quit button type of
thing.

So I am using GetSchema for schema stuff. and have a DataTable. Now how
would I populate a DataGrid?
"Greg Young" <gr********@planetbeach.com> wrote in message
news:en**************@tk2msftngp13.phx.gbl...
yes RowFilters are VERY powerful and more similar to what you might be
looking for ..

xpaths are also very powerful.

neither is "real" sql though.

"Dan V." <da**@yah.com> wrote in message
news:Os***************@TK2MSFTNGP12.phx.gbl...
How can I use real SQL on a DataTable? i.e. not array of rows using a
filter... as in DataTable.Select.

I read at : microsoft.public.dotnet.framework.adonet

"As others have posted: There is no SQL query processor for DataSets. You can use XPath with an XMLDataDocument built from the DataSet. You can also perform selections based on criteria, using the Find and
Select methods, and you can create row filters using DataViews."

Is this true?


Nov 16 '05 #3
I will use code like the following, and use a filter instead to work with
in-line memory data as opposed to running sql over the network again.

DataTable tblSchemaTable =

conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,

new object[] {null, null, null, "TABLE"})

OR

conn.GetOleDbSchemaTable(OleDbSchemaGuid.Columns,

new object[] {null, null, tblName, null})

// http://www.knowdotnet.com/articles/dataviews1.html

// http://www.knowdotnet.com/articles/expressions.html

DataView dvSchema = tblSchemaTable.DefaultView;

dvSchema.RowFilter = "COLUMN_NAME like '%PCX%'"

if (dvSchema.Count > 0)

MyDataGrid.DataSource = dvSchema;
"Dan V." <da**@yah.com> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
After reading some articles I have a better idea.

I basically am creating a utility for myself that allows one to run a SQL
query or Filter on every table in every database in a path (including
subfolders if desired). It basically will be used mostly to find table
names and column names that match a pattern. When at least one row is found it displays the 'table' in a DataGrid and has a next or quit button type of thing.

So I am using GetSchema for schema stuff. and have a DataTable. Now how
would I populate a DataGrid?
"Greg Young" <gr********@planetbeach.com> wrote in message
news:en**************@tk2msftngp13.phx.gbl...
yes RowFilters are VERY powerful and more similar to what you might be
looking for ..

xpaths are also very powerful.

neither is "real" sql though.

"Dan V." <da**@yah.com> wrote in message
news:Os***************@TK2MSFTNGP12.phx.gbl...
How can I use real SQL on a DataTable? i.e. not array of rows using a
filter... as in DataTable.Select.

I read at : microsoft.public.dotnet.framework.adonet

"As others have posted: There is no SQL query processor for DataSets. You can use XPath with an XMLDataDocument built from the DataSet. You can also perform selections based on criteria, using the Find and
Select methods, and you can create row filters using DataViews."

Is this true?



Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8080
by: Luc | last post by:
I am using Visual Studio 2003 and am getting lousy performance after using a datatable select and then trying to assign a value to a column of the row that was found: DataTable dt = new...
4
2543
by: Kris Rudin | last post by:
I am displaying a table of information on a web page, using an asp:table that I populate dynamically. On this page I give the user the options to group the rows by certain fields, and/or filter the...
0
3123
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
1
4017
by: Diffident | last post by:
Hello All, I am trying to filter rows in a datatable based on filtercriteria and sortcriteria using the datatable.select() method. I am encountering a strange behavior in this process. Here is...
3
1705
by: Fred Nelson | last post by:
Hi: I have created a datatable and I'm able to access it by key values. I need to be able to go to the "top" of the datatable and process records sequentially until they are completed. I...
12
2259
by: Doug Bell | last post by:
Hi, I am having problems trying to create a (temporary) DataTable from a selection from a DataGrid (dgOrders). dtOrdDetails is declared as a Public DataTable Sub is: Dim stFilter as String...
7
14974
by: wk6pack | last post by:
Hi, How do I check datatable.select(filter) in the following: for each dtrow in datatable.select(filter) .... next I've also tried:
4
7100
by: Aryan | last post by:
Hi, I am having problem with DataTable.Select() method. I am using ASP.NET 2.0. I have DataSet which reads data from XML file using DataSet.ReadXML(). Now this dataset has various datatable,...
2
13438
by: Rich | last post by:
Hello, I am just checking if there is a property or technique for displaying or retrieving from a dataTable the top 1 row(s) for rows containing duplicate keys (IDs). I have to pull data from a...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7352
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4875
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.