Joe Ruder
Joe Ruder

Reputation: 2194

vs2008 loses connection to database after updates in ssms2008

here is my setup:

Sql server 2008 standard running on Vista - VMware running a XP machine with VS2008 inside it.

If I open a SQL database in my host computer in sql server management studio and make structure changes to the database and then go back to visual studio, my visual studio has lost connectin to the database (says a network error has occured) - refreshing does not work. Closing down VS and reopending fixes the problem.

Has anybody else noticed this or is there maybe something wrong in my setup I should be looking into?

I can query the database, add data, delete data with no issues - only if I change the structure such as relationships or add remove columns etc.

Thanks,

Joe

Upvotes: 0

Views: 452

Answers (3)

u07ch
u07ch

Reputation: 13702

This might be a server faults question.

I had a similar issue with network sharing / SQL security in VMware (though mine was fusion on OS/X.) The issue seems to be the network drops and loses connections. In my case I was always able to resolve the issues with dhcp release / renew on the client.

I raised a support call with VMWare on it; the basic response was check your vmware is patched up-to-date and then make sure you have the right version of the vmware tools installed on the client. When that didn't work they had me change to full dhcp on the virtual machine and the host rather than fixed IP addresses.

Upvotes: 1

Tomas Aschan
Tomas Aschan

Reputation: 60654

I don't know if your problem is the same as mine, but if it is you could probably fix it by resetting some settings in Visual Studio.

Upvotes: 1

Ropstah
Ropstah

Reputation: 17804

I'd recommend NOT Attaching DB's as a file, but Attaching them to your local machine using SQL Server management studio express. You can use the following connectionstring:

connectionString="Data Source=(local)\sqlexpress;Initial Catalog=dbname;Integrated Security=SSPI;"

This will allow you to use the database from Visual Studio as well as in SQL Management studio....

edit the connectionstring is for SQL Express, you'd have to change it if you're running SQL Server 2008 (I believe change the Data Source to your machinename/ip)

Upvotes: 0

Related Questions