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?