.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> ADO.Net >> Post New Question Subscribe to Interview Questions

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

Posted By :Gowthammanju     Posted Date :July 31, 2011    Points :40   Category :ADO.Net 
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.



You can also find related Interview Question to What is the difference between Execute Reader, Execute Scalar and Execute Non Query methods?  below: 

What is the difference between Execute Scalar and ExceuteNoneQuery?

  
Execute Scalar returns the value in the first row first column of a query result set.

ExceuteNonQuery return number of rows affected. (More...)

execute scalar and execute non query

  
executescalar: returns single value after the execution of the query

ExecuteNonQuery : ExecuteNonQuery is used for execution of DML command. used with insert and update commands (More...)

what is used to execute a .net file from the command prompt ?

  
csc is C# compiler abbreviation is C Sharp Compiler (More...)

What are the ways available in SQL Server to execute SQL statements?

  

SQL Server uses different ways to execute SQL statements which are listed below.

1)Single SQL statement processing
2)Batch processing
3)Stored procedure and trigger execution
4)Execution plan caching and reuse
5)Parallel query processing

(More...)

Name of the task that is used to execute batch file in SSIS package?

  
Execute Process Task is used to execute batch files. (More...)

Can we Execute stored procedure in another stored procedure?

  
Yes, We can Execute stored procedure in another stored procedure... (More...)

How to execute .Net program with Windows scheduler

  
Steps:-

1) Compile your program and create exe
2) Navigate to All programs -> Accessories -> System Tools - Scheduled Tasks. Then Click Add Scheduled Tasks
3) It will open Scheduled Task wizard , Click Next
4) Click Browse button and Select your application
5) Click next, fill scheduling details
6) Click next , Fill you windows credentials
7) finish


(More...)

How can we execute a function that is defined in a package using Oracle/PLSQL?

  
We can execute a function by running an following SQL statement.

select package_name.function_name (15000)
from dual; (More...)

Where the data Store when we execute C# program

  
When we execute the Program That Temporarily Stored in Memory (More...)

What is the difference between Data Reader & Dataset?

  
Data Reader is connected datasource, read only, forward only record set.

Dataset is disconnected datatsource resides in memory database that can store multiple tables, relations and constraints; (More...)

Difference Between GET and POST methods in HTML

  
Difference Between GET and POST methods

GET:
1) Data is appended to the URL.
2) Data is not secret.
3) It is a single call system
4) Maximum data that can be sent is 256.
5) Data transmission is faster
6) This is the default method for many browsers

POST:
1) Data is appended to the URL.
2) Data is Secret
3) It is a two call system.
4) There is no Limit on the amount of data.That is characters any amount of data can be sent.
5) Data transmission is comparatively slow.
6) No default and should be Explicitly specified. (More...)

Expalin one difference between Abstract and virtual methods?

  
Virtual method can be overriden in any of its derived class and abstract method must be overriden in any of the non abstract class. (More...)

What is the difference between int.Parse and int.TryParse methods?

  
Parse method throws an exception if the string you are trying to parse is not a valid number where as TryParse returns false and does not throw an exception if parsing fails. Hence TryParse is more efficient than Parse (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend