Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I'm having an issue with a dynamic sql statement being executed in code by use of the DataAdapter.Fill method.
The statement itself is correct but results in a TimeOut exception when using the DataAdapter, while execution in SSMS gives instant results.

So far I have tried the usual suspects (i.e. corrupt data, query execution plans etc) but without results.

I have enabled tracing described in following link Data Access Tracing in SQL Server[^].
From this log file following line shows the error:

SQL
<Np::ReadSync|ERR|SNI> ProviderNum: 4{ProviderNum}, SNIError: 11{SNIError}, NativeError: 258{WINERR}


Looking up these errors doesn't help much. Common workarounds are either to set a higher timeout on the connection, or a higher connection pool. Both methods are just a 'hide it under the rug' way of making the issue go away without actually solving it.

So, has any one of you come across something similar? And if so, how did you solve it?

Thanks in advance,
Wim
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900