Hi Vivek:
IDataReader is an interface for all of the DataReader classes inherit
from. If you want your code to be provider agnostic then you'd need to
program against the IDataReader interface. With a careful design you
can switch from SQL Server and a SqlDataReader to Oracle and an
OracleDataReader with little or no changes to your code. The
disadvantage is you won't be able to take advantage of any special
features a provider offers.
There is a small example here:
http://support.microsoft.com/kb/313304/EN-US/
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 18 Nov 2004 14:05:26 +1300, "Vivek Sharma"
<jo*******@news.com> wrote:
Hi There,
can some one please clarify the difference between SQLDataReader and
IDataReader? What are the advantages and disadvantages of each?
Thanks
Vivek