View Single Post
  #10 (permalink)  
Old December 16th, 2014, 08:10 PM
C#Learner C#Learner is offline
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2014
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Wink

Quote:
Originally Posted by C#Learner View Post
Thank you VERY MUCH to all who helped me to solve the problem!!! A few days of frustration and struggle…I would like to share my experience and might help somebody else who are in the same trap.

If you experience a problem with the program see the answer of olo-B above and concatenate the server name:

Code:
cmbServer.Items.Add(serverName +"\\" + row["InstanceName"]);
If it still does not help then,

In Microsoft Visual Studio open Database Explorer and try to add a new connection.

In a list of server names could be only the name of your computer, even if you hit the “Refresh” button.

After you type the name of the server, there is a list of databases. Chose a database which you need and test the connection (there is the button). You can receive a confirmation that test connection succeeded.

However, when you hit OK, you got an error message:
-------------------------------------------------------------------------------------
Database Explorer

Unable to add data connection. Could not load file or assembly ‘Microsoft.SqlServer, Management. Sdk.Sfc, Version=11.0.0.0, Cuture=neutral, PublickeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.
--------------------------------------------------------------------------------------
It means that you need to install two missing components, which you can find in:
Microsoft® SQL Server® 2012 SP2 Feature Pack
http://www.microsoft.com/en-us/downl....aspx?id=43339
These components are:
1) SQL System CLR types
and
2) SQL 2012 Shared Management Objects
[SQL 2012 Shared Management Objects] has dependency on [SQL System CLR types] component, so you have to install SQL Server System CLR Types first.

For more info go to:
http://sqlbeyond.blogspot.co.uk/2012...d-file-or.html
My specs:
OS Windows 7 Professional
Microsoft Visual Studio Express 2013 for Windows Desktop
Microsoft SQL Server Express 2014
Microsoft Security Essentials
Microsoft Fire Wall

Good luck!
Hi to all,

I need to make a note to my previous post. After you’ve downloaded and installed two additional components you also should start SQL Browser (it does not start by default).

Go to all programs
Microsoft SQL Server 2014
Configuration Tools
SQL Server 2014 Configuration Manager and start it.

On the left side left-click SQL Server Services.
On the right site you can see SQL Server Browser. If it has a red square, it means it does work at the moment.

Right –click it and go to Properties. In a check box Built-in Account should be a Local Service.
Go to Service (it’s on the top of window) and in the Start Mode choose Automatic.
Push Apply.

If you restart SQL Server 2014 Configuration Manager, SQL Server Browser should have a green arrow.

Now your program should work.
Good luck!