" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Add a pinch of salt to data access performance

Posted on November 23rd, 2015 by Rabinarayan Biswal

 To acess data from a Data Reader, we mostly use the column / field name to retrieve data from a field .   And we use field name instead of index atlest for the following two reasons :- 1. using field name instead of index makes the code more readable 2. if the column order changes […]

NextResult() in C# or ADO.NET data reader

Posted on November 23rd, 2015 by Sumit Singh

In a application if  you wants to take data from two table which have no relation to each other.At this situation you write two separate SQL query to take data from data base there is a work around to take data from multiple table in single a query.   In this sample code below: I want […]

Database Reader Object Parsing in .NET

Posted on November 23rd, 2015 by Vikash Kumar

In many code reviews, I have seen we miss out proper object parsing from SqlReader or end up with repeated lengthy codes or there is no fail safe mechanism to handle, if parse fails out. I will be extending an approach that I have been using in dynamic forms for parsing to make it compatible […]

Choosing between DataTable vs. DataReader in ADO.NET

Posted on November 23rd, 2015 by Rabinarayan Biswal

Choosing between DataTable and DataReader has been a point of debate since the evolution of ADO.NET. Here are some simple guidelines which can help you choose the one for your application.  Choose DataTable: To reuse the same set of rows across different function calls throughout the application. To achieve a performance gain by caching them […]