Friday, January 16, 2009

Commanding a Database

you can perform actions or operations on it. To make this possible and probably easier, the System.Data.OleDb namespace provides the OleDbCommand class.class is used to create commands or actions to be performed on the database. To create a command, the OleDbCommand class is equipped with four constructors. The first constructor is the default. It allows you to declare an OleDbCommand variable without specifying its assignment.


The Type of Command:
A command is usually created as a string but a command can also be created as a function, also called a stored procedure.
specify the type of command you want to create, the OleDbCommand class is equipped with a property named CommandType. This property is of type OleDbCommand, which is a structure that holds values that specify the type of command to be carried.
The CommandType enumerator has three members:
1.StoredProcedure

2.TableDirect
3.Text.

For an OleDbCommand variable, the default isText.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home