阅读背景:

是什么原因导致DbDataAdapter.Fill用不正确的列数填充DataSet?

来源:互联网 

I have a windows service connecting to a SqlServer database on the local box. This works fine most all the time. At a large customer, however, the database connectivity gets corrupted for some rare and unknown reason. When this happens, calls to DbDataAdapter.Fill return a DataSet with a different number of columns than in the select command passed in (validated by trace logs showing the sql expected, and the number of columns returned). For the first few errored DataSets it appears the adapter instance is returning results from the previous query. This is happening even though the adapter objects are unique instances, and the connection/adapter creation calls are thread protected (as DbProviderFactory is not thread safe).I have a windows service connecting to a SqlSer




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: