Solved

Search a DataSet using SQL Select statements

Posted on 2006-06-28
2
1,520 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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now