ado.net

Call Hierarchy : A handy feature in Visual Studio 2010

Suppose we have a solution that contains different dependent projects. We can face 2 most common situation here: Situation 1: We have a method that we need to change by modifying the definition of that method or just we want to check that which other methods are calling this method. Situation 2: We have a Call Hierarchy : A handy feature in Visual Studio 2010

Object cannot be cast from DBNull to other types

Sometimes you need to code around dates in your program. Today i will discuss about the common error we get while displaying a date from back end to front end. What if you have blank/null value inserted in your back end for date and when you get this date to front end and try to Object cannot be cast from DBNull to other types

Resolved: Collection was modified; enumeration operation may not execute

I was playing with a data table object, my requirement was to merge all duplicate rows to one and remove the duplicates. e.g. Book     Price Quantity Title 1 210   4 Title 1 210   6 Title 1 210   8 These were the rows inside my data table object. I want a consolidated row in place Resolved: Collection was modified; enumeration operation may not execute

Binding CheckBox with Integer value in GridView:Trick

I was working on a web part basically it was an attendance web part that contains Name and Present column only and display as GridView. Name contains the full name of employee and present contains Yes/No value for that employee. I took the present column as checkbox column that displays values using checked or unchecked. Binding CheckBox with Integer value in GridView:Trick

Use DataReader Cleverly

IntroductionADO.NET DataReader is a read only and forward only cursor that allows you to iterate through the records very fast. In terms of performance DataReader is possibly the fastest way to fetch and iterate the rows. However, if used incorrectly it can cause some troubles. This article throws light on some of such things to Use DataReader Cleverly