which one is faster execute reader, scalar, execute non
query ?
Answer Posted / satish v itagi
ExecuteNonQuery is used to inserts, updates, deletes.
ExecuteScaler is used to return values at a stretch; and
can do data modifications too.
ExecuteReader is forward only reading of row by row.
The number of readers that can be open at a time has
limitation (255)
Execute Scaler has no such restriction. You can use
sqlparameters (output) to get more than one field value,
you can use multiple queries to get more than one result.
Because of less overheads, ExecuteReader has a slight
performance advantage but has limitations.
Do not forget to close Readers!
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Can you explain autopostback?
what is AutoEventWireUp and what is the use of This property explain in details?
What is the difference between client-side and server-side validations in webpages?
What is preprocessor in .net and type, where it use?
Where the viewstate is stored after the page postback?
Explain difference between dataset and recordset?
What is the namespace to create thread in .net?
What is state management react?
a web application needs to be created to accept the product name and quantity of a toy from a customer. After the customer has entered the product name the application needs to display the discounted price of the product to the customer (company is offering 35% discount on all products). The application should allow the customer to select the product name from a list box. and also while i'm data binding to a label with custom data binding with some declarations : "The Discounted Price is "+((System.Convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)) - ((System.convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)*0.35)). Where i need to give this declaration in asp.net 2.0.
What are the different types of sessions in asp.net?
Explain how can we inherit a static member?
In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?
Why cyclomatic complexity is important?
How you can add an event handler?
How to rename a table using sql queries?