Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I prevent 'objects you are adding to the designer use a different data connection...'?

I am using Visual Studio 2010, and I have a LINQ-to-SQL DBML file that my colleagues and I are using for this project.

We have a connection string in the web.config file that the DBML is using. However, when I drag a new table from my "Server Explorer" onto the DBML file... I get presented with a dialog that demands that do one of these two options:

  1. Allow visual studio to change the connection string to match the one in my solution explorer.
  2. Cancel the operation (meaning, I don't get my table).

I don't really care too much about the debate as why the PMs/devs who made this tool didn't allow a third option - "Create the object anyway - don't worry, I'm a developer!"

What I am thinking would be a good solution is if I can create a connection in the Server Explorer - WITHOUT A WIZARD. If I can just paste a connection string, that would be awesome! Because then the DBML designer won't freak out on me :O)

If anyone knows the answer to this question, or how to do the above, please lemme know!

like image 326
Timothy Khouri Avatar asked May 24 '10 00:05

Timothy Khouri


People also ask

What are the types of data connections?

You can create three types of data connections to an external data source: query data only, submit data only, or both query and submit data. A query data connection receives data from a data source and stores that data in the form.

What are the basic data connections?

There are two fundamental components to data connections; the data connection itself, and the connection data source. A data connection stores information about what data in a database or cube that should be available as data tables in Spotfire.


1 Answers

Here is a similar thread that has a couple of options. Unfortunately all of them are a bit of a work around, but it seems like the best current solution to the problem. Managing different developer's connection strings under LINQ to SQL

like image 123
ljkyser Avatar answered Nov 13 '22 21:11

ljkyser