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:
<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