Solved

Linq to SQL connection error

Posted on 2008-10-14
3
373 Views
Last Modified: 2013-12-17
Hello Experts,

I am trying to use Linq to SQL in a VS 2008 app in c#.  I have created a DBML file in my project.  I go into the Server Explorer and try to connect to my database using "Microsoft SQL Server (SqlClient)" as my data source and ".Net Framework Data Provider for SQL Server" as my data provider.  Then I choose the server and database.  I use Windows Authentication which works in Management Studio.  I test the connection and it works but when I click OK to establish the conntection I get an error.  A screen print is in the attached file.

Then my boss tried to connect using ".Net Framework Data Provider for OLE DB" for my data provider.  I did that and was able to connect to the database.  But when I tried to drag and drop a table from the database onto the DBML Designer, I got another error.  It is also included in the attached file.

Can you help me?

Thanks.
Connection-errors-using-Linq.doc
0
Comment
Question by:sschuman220
  • 2
3 Comments
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 22713540
Hi sschuman220;

The Linq to SQL is supported using Microsoft SQL Server or Microsoft SQL Server Express using the "Microsoft SQL Server (SqlClient)" as the Data Source and ".Net Framework Data Provider for SQL Server" as the Data Provider and is not supported on the ".Net Framework Data Provider for OLE DB" Data Provider.

Are you using VS 2008 with SP 1 Beta?

I am using VS .Net 2008 with SP 1 and have had no issues like you are having but I have heard that with SP 1 Beta installed but do not know if updateing to SP 1 full release will fix it.

Fernando
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 22713986
Does this mean that you had SP 1 Beta and updated to SP 1 and it worked?
0
 

Author Comment

by:sschuman220
ID: 22720364
I had SP1 installed.  I uninstalled it and reinstalled it and got the LINQ connection to work.  I don't know what the problem was but that solved it.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question