Explain the difference between sqlcommand object and command behavior object?



Explain the difference between sqlcommand object and command behavior object?..

Answer / Nivedita Mishra

SQLCommand Object is a class in ADO.NET that represents a Transact-SQL statement, stored procedure, or function. It contains properties like Connection, CommandText, and CommandType. CommandBehavior Object, on the other hand, is an enumeration that defines different behaviors for SQLCommand Object. For example, CommandBehavior.SequentialAccess indicates that only the first field of a recordset should be read, while CommandBehavior.CloseConnection closes the connection after execution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What is data adapter in ado.net with example?

1 Answers  


What providers does ado.net uses internally ?

3 Answers   Digital GlobalSoft,


What is connection string?

1 Answers  


Describe connection object in ado.net

1 Answers  


What is Serialization in .NET? what are the types of Serialization?

1 Answers   Arigo Infotech,


Why ca not we use multiple inheritance and garbage collector paralelly in .net?

1 Answers  


What's the difference between Dataset.clone and Dataset.copy?

10 Answers   Ksb,


What is two way data binding android?

1 Answers  


Explain the role of data provider in ado.net? What is the role of data provider in ado.net?

1 Answers  


How to generate XML from a dataset and vice versa?

2 Answers  


How would u connect to database using .NET?

5 Answers   TCS, Tesco,


What are the namespaces used in ado.net for data access?

1 Answers  


Categories