SqlDataAdapter.Fill suddenly taking a long time

2019-08-12 05:38发布

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条回答
兄弟一词,经得起流年.
2楼-- · 2019-08-12 05:57

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

enter image description here

查看更多
登录 后发表回答