Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create SQL Database and add to project using Visual Studio

When I go to the 'Add New Item' window in Visual Studio 2005 and try to add a SQL Database it hangs for a bit and then give the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

I can use SQL Server Management Studio to connection to localhost (default instance) just fine, but Visual Studio must be trying to connect to another instance (that isn't running anymore). How do I change what instance it tries to connect to in order to add and use the database?

like image 276
Max Schmeling Avatar asked Oct 15 '22 16:10

Max Schmeling


1 Answers

It sounds like you may be trying to add an instance of an SQL Server Express database but you may not have that service installed or turned on.

like image 124
TheTXI Avatar answered Oct 19 '22 22:10

TheTXI