473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

query against XML dataset possible ?

I have an XML file that is strongly typed with a schema & read in to a dataset
Now I thing I would like to 'select on certain criteria' - to create a subset to show in a different grid

Is it possible to do that ? I have yet to find an example.
Or do I have to work with XPath to get a subset

Thanks Andrew
Nov 16 '05 #1
4 4566
Specifically I would like to have an expression like
transactionrecord = dataset.tables["transactionrecord"]

I did find a DataTable.Selec
another method about Compute - which takes some string expression

" Select UNIQUE * from transactionrecord where fieldname_1= 'ERROR'

Is this possible ?? Seems like it might be...
But I dont know what might be supported. In my case I have a windows service running on a serve
and I want to look at the unique errors found during the process. ( The data is logged to a monthly file )

Thanks
Nov 16 '05 #2
You can use some of the Find, Filter and Select methods available
in the DataSet, DataTable and DataView classes. check the docs for examples.
Peter
"andrewcw" <an******@acw.com> wrote in message
news:31**********************************@microsof t.com...
I have an XML file that is strongly typed with a schema & read in to a dataset. Now I thing I would like to 'select on certain criteria' - to create a subset to show in a different grid.
Is it possible to do that ? I have yet to find an example.
Or do I have to work with XPath to get a subset ?

Thanks Andrew

Nov 16 '05 #3
thanks - I think this is pretty inclusive. http://msdn.microsoft.com/library/de...essiontopic.as

I see the syntax is similar to what I might use with a Database. I specifically am looking to also use a 'DISTINCT' type expression to filter out duplicate column entries. Do I have to loop through the data set returned to do that ? Seems that way. Thanks
Nov 16 '05 #4
Hi andrewcw,

Thanks for your feedback.

Yes, to do the "DISTINCT" function, you have to determine it through loop
yourself.

If you need further help, please feel free to post.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #5

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

Similar topics

3
by: Jonathan | last post by:
Hi all! For a match schedule I would like to find all possible combinations of teams playing home and away (without teams playing to themselves of course). I now the simple version works...
2
by: Andrew Mueller | last post by:
Hello, Since I cannot query a DataSet directly, and I would like to maintain it's data, how would I use an adapter (SqlDataAdapter or DataAdapter) to query this DataSet. Example: Could I? ...
1
by: microsoft.news.com | last post by:
is it possible to run a SELECT statement against a datatable, and if so how? this is what i have, its populating an excel document, I have my dataset, creatig a data table, now i need to group the...
1
by: brian | last post by:
If I create a dataset called "Test" can I run SQL code against that dataset? If so How? Can a dataset be cached? If so how would you run a query on that? The reason I am asking is because...
2
by: John | last post by:
Hi Is it possible to do run a select query on a dataset from a web method using a dataadapter? A code example would be great. If not, how can we grab hold of the remote dataset data in a local...
1
by: Chris Thunell | last post by:
I have a dataset / datatable in memory and i would like to run a query against that to create another in memory datatable or dataview. In this case I have a bunch of data... and i want to run a...
1
by: Adam Clark | last post by:
Hi Is it possible to run a query against a dataset. For example, I want to create a new table and I read somewhere that ADO.NET does not support creating tables in access without the use of sql...
3
by: phonl | last post by:
I am a vb6 ADO developer looking at vb.net 2005 and ADO2.net. I used the vb.net 2005 data wizard to bind some controls to a database. Now I want to run a select query and have the bound controls...
10
by: Robert | last post by:
I am an attorney in a non-profit organization and a self-taught programmer. I'm trying to create a client db that will allow me to search for potential conflicts of interest based either on Social...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.