Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Search a DataSet using SQL Select statements

Posted on 2006-06-28
2
Medium Priority
?
1,530 Views
Last Modified: 2008-01-09
Please tell me if it is possible and if it is how to use SQL select statements to query a dataset.

Thank-you
0
Comment
Question by:fly412s
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1500 total points
ID: 17003404
It is not possible to use SQL Select statements to filter a DataSet.  The DataTable has the .Select method, but it is only simple filter expressions, such as:

   DataRow[] findRows = table.Select( "Name = 'Bob' );

Bob
0
 
LVL 25

Expert Comment

by:dstanley9
ID: 17003423
You can Query a DataTable:

DataTable table = new DataTable();
// fill rows
DataRow[] rows = table.Select("{field} = {value}","{sortcolumn}");

the first parameter is essentially the WHERE clause, and the second (optional) parameter is the ORDER BY clause


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question