Command

  • Command is used to provide the source of the connection object.
  • Syntax:    

    SqlCommand commandObectName = new SqlCommand ();

  • Command object methods
    • ExecuteNonQuery (): executes non Select statements.
    • ExecuteReader ()    : executes only Select statements when expect too many records.
    • ExecuteScalar ()    : executes Select statements for first match record to use with Primary key.
  • Command object properties
    • CommmandText
    • CommandType

0 comments :

Post a Comment

> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger