question

virendrasingh_77 avatar image
virendrasingh_77 asked

.net sqlclient data provider is not giving output while same query in SSMS gives instant output.

.Net sqlclient data provider v/s microsoft sql management sql query
.net-framework
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GPO avatar image GPO commented ·
Without seeing the query it's hard to know, but this can be resolved sometimes by adding SET NOCOUNT ON to the top of your query. If, for example, you've changed your query to SELECT into a temp table, and later generating the resultset that you ultimately want, the message coming back from the temp table insert may be interfering with the display of the subsequent results.
0 Likes 0 ·

1 Answer

·
ThomasRushton avatar image
ThomasRushton answered
Check your connection options between the .NET application and SSMS. For more details of what this means, see Erland Sommarskog's article ["Slow in the Application, Fast in SSMS"][1] [1]: http://www.sommarskog.se/query-plan-mysteries.html
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

virendrasingh_77 avatar image virendrasingh_77 commented ·
thank for reply but my application is running properly suddenly this problem occur, what is the problem any idea?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.