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# 
 1 Answer(s)
  1219  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

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