0

I am hoping someone can help me...I am totally frustrated! I am using Visual C# 2010 Express (which might be the problem right there, but I wouldn't think so).

I have added a .dbml (LINQ to SQL) file to my project and I am about to create a new connection. This works fine when I use ASP.NET. When I right-click on "Data Connections" and choose "Add Connection," the dialog box appears. The first field is: "Data Source." Normally, when you click the "Change" button, you have a choice which includes "Microsoft Sql Server Database (Sql Client)." This choice does NOT appear - instead, I am forced to use "Microsoft Sql Server Database File," which makes me choose an .mdf file. But this won't work - when I attempt to test the connection, I get the following error message: "A network-related or instance-specific error occurred while establishing a connection to Sql Server..." It appears as though it's trying to ATTACH the DB file, but, of course, it's already attached! So I can't understand why I can't just select the database, like I can with an ASP.NET project.

Why won't the correct choice appear in the dialog? Has anyone else experienced this problem????

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by chickod
0

Just a regular end-user RDBM. Actually, I'm doing a tutorial and trying to connect to the AdventureWorks DB, but the same thing happens no matter which DB I try to connect to (whether it's Northwind or anything I have created myself).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.