Populer Topics

Command Class

This is specially used under connected architecture command allow us to different type of sql command like insert, update, delete etc.It has several method which help us to manipulate or fetch the data from database we call all method with sql and OLEDB source.

All most method & properties are generally command is perform by operation on data table or dataset are following.

Property Description
Connection

This is one of the important property which specify that property which specify the connection object. We need to open connection before executing command. We can specifies connection in sql command constructor or can specifies in this property.

CommandText

This property specifies the command text which can be insert, update, delete or any other command. We can specifies command text in construct or this property.

CommandType

We can specifies the type of command inside command object either be text or stored procedure.

Parameter This property will be pass a parameter is stored procedure or command text.

 

Property Description
EcecuteNonQuery()

This is used incase we have given transaction command lie insert, update, delete command.This method return int value. It return >0 if command is successfully executed, And 0 if command is No Row affected.

ExecuteReader()

This Method is used to specifies the this allow command object to connect with data render which help us read the data.

ExecuteScalar()

This method is used when we specifies select command. But it return only one value of first row & first columns.

Cancel() This method is used to cancel command text from being executed.