Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the difference between Execute Reader, Execute Scalar and Execute Non Query methods?

0
Posted

What is the difference between Execute Reader, Execute Scalar and Execute Non Query methods?

0

Execute Reader Execute Reader will be used to return the set of rows, on execution of SQL Query or Stored procedure using command object. Execute Scalar Execute Scalar will be used to return the single value, on execution of SQL Query or Stored procedure using command object. Execute Non Query If the command or stored procedure performs INSERT, DELETE or UPDATE operations, then we use Execute Non Query method. Execute Non Query method returns an integer specifying the number of rows inserted, deleted or updated.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123