Solved

Linq to SQL connection error

Posted on 2008-10-14
3
370 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 62

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 62

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now