Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mulefeathers
Starting Member
12 Posts |
Posted - 2012-10-19 : 15:10:17
|
| I have SQL installed using a default instance. I have imported an Access database with 4 basic tables. Using VS 2010 I have created a basic form frontend. I have attempted to create a data connection using both the wizard and in code. When attempting to use the wizard I receive the following error message: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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I have searched and tried all suggestions. I have made sure named pipes and tcp/ip are both enabled. The correct port is listed. Remote connections are enabled. I have used an account through widows authentication as well as created a new SQL authentication account. The VS 2010 and SQL 2012 are on the same machine. I know there is something I'm missing. |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-10-19 : 15:28:14
|
| Are you able to connect with SQL Server Management Studio? Start->Run -> Sevices.msc and look for SQL Server entries. If you see SQL Server (MSSQLServer) use (local) for servername.If you see SQL Server (SomeString) use (local)\SomeString as servername.Also make sure that the service status shows as Started.Also, what is the connection string you are using? |
 |
|
|
mulefeathers
Starting Member
12 Posts |
Posted - 2012-10-19 : 16:13:42
|
| Yes I am able to connect using the Management Studio. I have been able to make a connection. Where my code said "Data Source =.\SQLEXPRESS" I removed the "\SQLEXPRESS and it worked. Thanks for the help. |
 |
|
|
|
|
|