Technology Tutorials
Pages
Home
Wednesday, December 7, 2011
Difference between Execute Scalar and Execute Reader
What is the difference between Execute Scalar and Execute Reader?
Execute Reader..
1.Returns a datareader with data.
2.It is done by command object.
3.It is readonly.
4.It executes only select command.
5. This is known as a forward-only retrieval of records.It uses your sql statement to read through the table from the first to the last.
Execute NonQuery..
1.It will not return any data.
2.It is used with insert and update.
3.It returns only the number of rows affected.
Execute Scaler..
1.It returns only one value.
2.That value will the first column first row value.
Execute Query..
1.Its for command objects.
2.It returns the value given by database through select statement.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment