SqlDataAdapter.Fill suddenly taking a long time

与世无争的帅哥 提交于 2019-12-13 00:59:33

问题


I have an application with a central DataTier that can execute a query to a data table using an SQLDataAdapter. None of this code has changed but now all queries are taking at least 10x as long to execute a query returning even one record.

The only difference is that I have been using the app in a VM but the issue has started mid way through using the application. eg, the speed issue has not manifested itself from the start of using the VM, rather half way through.

Has anyone else had an issue with the SQL Data Adapter taking a long time to fill for no reason? executing the query in Management studio it runs in less than a second.

Firewalls are disabled


回答1:


ok, after another half day wasted on this it seems to be an issue relating to networking on the Virtual PC.

I have seen a massive improvement by changing the network adapter in the VM to Shared NAT and no longer experience the long delay when populating data tables.

Its obviously having an issue resolving the SQL server.

For anyone else that stumbles across this post here are the settings



来源:https://stackoverflow.com/questions/7992560/sqldataadapter-fill-suddenly-taking-a-long-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!