Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: .NET
Expertise: Intermediate
Jan 16, 2007

Use DataTable.Rows.Find() Instead of DataTable.Select()

ADO.NET generates indexes on the primary key(s). So, if you have to search a datatable for records based on some primary key value, use DataTable.Rows.Find() instead of DataTable.Select(). The Find method will use the index to find the row. This turns out to be faster because of the presence of the index.

Srinath MS
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap