views:

56

answers:

3

Hello,

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

A: 

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)

Ropstah
Thank you,I believe that is how I am connecting, this is the connection string I am using:Data Source=thor\SQLEXPRESS;Initial Catalog=PACKAGE_TRACK;Persist Security Info=True;User ID=dbuser;Password=******
MostlyLucid
+1  A: 

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.

Tomas Lycken
That did not do it -- however it did solve some other issues I had, so thanks!
MostlyLucid
+1  A: 

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.

u07ch
Hmmm...that could be the issue - I have had some other quirky things going on with the network at times. I may try to using dhcp as opposed to the static IP I am currently using.
MostlyLucid