Define different execute methods of ADO.NET command object ?



Define different execute methods of ADO.NET command object ?..

Answer / Deepshikha Raghav

The ExecuteNonQuery method is used to execute SQL commands that do not return a result set, such as INSERT, UPDATE, or DELETE statements. The ExecuteScalar method returns the first column of the first row from the result set of a query, typically used for retrieving scalar values like counts. The ExecuteReader method returns a DataReader object, useful for reading forward-only, stream-based access to the data in a result set. Lastly, the ExecuteXmlReader method returns an XmlReader object, which provides read-only, forward-only access to XML data.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What are the different layers of ado.net?

1 Answers  


What is the difference between Dataset. clone and Dataset.copy?

1 Answers  


What is method to get XML and schema from Dataset? getXML() and get Schema ()

1 Answers  


What is ole access?

1 Answers  


Which is faster sqldataadapter and sqldatareader?

1 Answers  


can we have multiple datatables in a datareader ?

18 Answers   Fulcrum Logic, Infosys, Kale Consultants, Ness Technologies,


What are the differences between RAW, AUTO and Explicit modes in retrieving data from SQL Server in XML format?

1 Answers   TCS,


Why do we use sqldataadapter?

1 Answers  


What are the Different layers in ADO.Net?

10 Answers   eXensys,


What is csdl entity framework?

1 Answers  


What are the ado.net connection pooling parameters?

1 Answers  


What do you know about ado.net's methods?

1 Answers  


Categories