How many types of CommandType options are there in Command object of ADO.NET?

Wednesday, July 15, 2009


There are 3 types of CommandType in Command object of ADO.NET. They are :

1. CommandType.Text
2. CommandType.TableDirect
3. CommandType.StoredProcedure


1. CommandType.Text:
Should be used when you pass a TSQL statement(select,insert,update,etc).


2. CommandType.TableDirect
You will specify the name of the table from which you want the records.


3. CommandType.StoredProcedure
Is used when you pass the name of a stored procedure.



www.codecollege.NET

0 comments

Post a Comment

www.codecollege.NET

Blog Widget by LinkWithin