D
Dune
I'm a bit confused as to how the sqldatareader oughta be
used...
so far, I've just assumed that it was only used with
SELECT statements and "Provides a means of reading a
forward-only stream of rows from a SQL Server database."
(from msdn)
however, sqldatareader has a RecordsAffected property and
the documentation says this property is "The number of
rows changed, inserted, or deleted; 0 if no rows were
affected or the statement failed; and -1 for SELECT
statements."
....implying that sqldatareader can be used to
update/insert/delete. If this is so and given
sqldatareader's good performance, does this mean that
updating with a sqldatareader is faster than updating
using the command object's ExecuteNonQuery()?
used...
so far, I've just assumed that it was only used with
SELECT statements and "Provides a means of reading a
forward-only stream of rows from a SQL Server database."
(from msdn)
however, sqldatareader has a RecordsAffected property and
the documentation says this property is "The number of
rows changed, inserted, or deleted; 0 if no rows were
affected or the statement failed; and -1 for SELECT
statements."
....implying that sqldatareader can be used to
update/insert/delete. If this is so and given
sqldatareader's good performance, does this mean that
updating with a sqldatareader is faster than updating
using the command object's ExecuteNonQuery()?