Home > DeveloperSection > Interviews > What are the different methods available under sqlcommand class to access the data?

Posted on    January-27-2014 11:07 PM

 C# C# 
Ratings:
 1 Answer(s)
  1247  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Points:3910
Posted on    January-27-2014 1:00 AM

ExecuteReader - Used where one or more records are returned - SELECT Query.

ExecuteNonQuery - Used where it affects a state of the table and no data is being queried - INSERT, UPDATE, DELETE, CREATE and SET queries.

ExecuteScalar - Used where it returns a single record.


Don't want to miss updates? Please click the below button!

Follow MindStick