Reputation: 1156
I'm pretty new to Visual Studio so this might be an easy issue :)
I have created a Visual C# SQL CLR Database project where I have created a Trigger. This trigger is supposed to access an IIS on another machine in the network. In order to do this I found that I needed System.DirectoryServices but when I added this VS complained that I needed an assembly. Then I found that I should run the CREATE ASSEMBLY in the MS SQL SERVER. Did that successfully and successfully added my database as a data connection (Server Explorer -> Data Connections). In the Assemblies subfolder I can see the System.DirectoryServices but cannot reference it from the add reference... (when right-clicking references in the solution explorer). When trying to add a reference I have two tabs: Projects (empty) and SQL Server which gives the following error:
The connection to the database failed for the following reason: There is no available SQL server connection.
No server references can be added at this time, but you may continue to develop the project.
When I try to add a server connection to either localhost or the machine name of my computer it seems to do nothing (no error but also no server is added in the server explorer).
Upvotes: 1
Views: 1862
Reputation: 36
In Solution Explorer, right click on the Project and select 'Properties'. Select 'Database' tab on the right hand side, then browse to your database or insert a connection string.
Upvotes: 2