Click here to Skip to main content
13,289,626 members (60,521 online)
Rate this:
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,
Posted 7-Dec-12 4:27am

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

Advertise | Privacy |
Web01 | 2.8.171207.1 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2017
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