Click here to Skip to main content
11,503,113 members (74,663 online)
Rate this: bad
good
Please Sign up or sign in to 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:

<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 7-Dec-12 3:27am
cptKoala3.6K

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



Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100