Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Abhisek Panda
(40)
Alwyn
(20)
Asheej T K
(12)
Last 7 Days
Alwyn
(684)
nishithraj
(512)
Gaurav Arora
(494)
more...
Resources
»
Code Snippets
»
ADO.NET
»
Get Multiple records using DataTable.Select.
Posted Date: 25 Oct 2008
Resource Type:
Code Snippets
Category:
ADO.NET
Author:
Varun Bansal
Member Level:
Gold
Rating:
Points
: 10
OleDbConnection myConnection = new OleDbConnection("Provider=SQLOLEDB.1;Data
Source=localhost;database=northwind;User Id=sa;Password=;");
OleDbDataAdapter myda= new OleDbDataAdapter ("Select * from Orders", myConnection);
System.Data.DataSet ds= new DataSet ();
myda.Fill (ds,"table");
DataRow[] dr ;
string id ="ROMEY";// "Field with id ROMEY has more than one records found
string sel ="customerid='"+ id + "'";
dr = ds.Tables [0].Select (sel);
int i;
for(i=0;dr.read();i++)
{
Response.Write (dr[i]["Orderid"].ToString() + "\t" +
dr[i]["Customerid"].ToString() + "\t" + dr[i]["Freight"].ToString () +
"
");
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
Ues of DataTable.select statment.
.
Select specific records from datatable.
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
View records one by one from ds on click of buttons
Previous Resource:
MySql and Ado.Net
Return to Discussion Resource Index
Post New Resource
Category:
ADO.NET
Post resources and
earn money
!
More Resources
Shuffling Data Values : Make it simple with using
newid()
Linq in ASP.NET
Connecting MySQL with C#
Insering Values in to Database
Storing login information in XML file
Grid Demo
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use