WHAT ARE THE DIFFERENT METHODS AVAILABLE UNDER SQLCOMMAND CLASS TO ACCESS THE DATA?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
C# 
C#
 1435  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    What are the different methods available under sqlcommand class to access the data?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!