Tuesday, October 14, 2008

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.

No comments:

Difference Between Apache Common Logging and Log4J

Dear Folks, Log4j is a logging framework, i.e. it provides the code to log messages while Commons-logging is an abstraction layer for log...