which one is faster execute reader, scalar, execute non
query ?
Answer Posted / peter
What is faster:
ExecuteNonQuery("INSERT INTO...; INSERT INTO...; INSERT
INTO");
or
ExecuteNonQuery("INSERT INTO...")
ExecuteNonQuery("INSERT INTO...")
ExecuteNonQuery("INSERT INTO...")
I hope you see my point. Of course it is not a matter of
only three inserts, but maybe 200 - and then I would like
to know if I can save time by adding the INSERT-strings to
one big string and only fire off one ExecuteNonQuery.
I was thinking of coding a test to check, but if some of
you have already done this or just know which is faster,
please let me know.
Thanks
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How will create assesblies at run time?
3. What goals do you have in your career?
How do you handle server controls?
What are the features of asp net?
What is the difference between client-side and server-side validations in ASP.NET?
Define a static class?
What is server side routing?
How do you do client-side validation in .net? How to disable validator control by client side javascript?
Explain method to handle error using HttpError in Web API?
Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?
Distinguish between Server-side and Client-side code?
How ViewstateMac works?
What is the file extension of web service?
What are Master Pages in ASP.NET? or What is a Master Page?
Explain why it is useful to use mvc instead of webforms? : asp.net mvc