Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 161749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:16:06+00:00 2026-05-11T11:16:06+00:00

I have an asp.net application developed. It uses LINQ to SQL to access database,

  • 0

I have an asp.net application developed. It uses LINQ to SQL to access database, using the .dbml designer in Visual Studio 2008. We are installing the application on client, and they have decided to change the database name on their servers. Now, the application does not work because LINQ can’t find the database information. This is not an issue with the connection strings, but with the files generated by the .dmbl designer. I suppose we have some options: 1. Change the development database name to match the client’s name, regenerate de dbml, recompile, and send the application again to client. 2. Install VS2008 on client and make the necessary modifications there.

None of the options seem really good. This is not the end of the world, but it is a real pain. I hope there’s a more reasonable solution! Any ideas?


UPDATE
After studying the problem a bit further with the help of your answers, I think the problem lies with the schema. To sum up, the database has a new name and a new schema. I suppose the sqlmetal.exe option is the best one right now. Anyways, if this is the case, I still think it’s a real pain.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:16:06+00:00Added an answer on May 11, 2026 at 11:16 am

    I would say it Is a connection string problem, see the generated class:

        public SomeDataContext() :          base(global::System.Configuration.ConfigurationManager .ConnectionStrings['someConnectionStringKey'].ConnectionString, mappingSource) 

    Please provide more info. Perhaps you mean an schema change, in which case I strongly suggest to have it the same on the dev environment.

    Update 1: Perhaps the DatabaseAttribute on the generated class confused you.

    Use the Name property on a DatabaseAttribute attribute to specify the name of a database when a name is not supplied by the connection

    Source: http://msdn.microsoft.com/en-us/library/bb399355.aspx# (enpashis by me)

    Just specify the database in the connection string, and you are good to go.

    Update 2: If your generated class for some reason doesn’t has the above code (and you aren’t explicitly specifying one in the parameter), open it on the designer, open the properties, and make sure it is configured in the Connection property with Applications Settings set to truth.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a asp.net application using Visual Studio 2008 and it was working
HI, i developed application in Visual Studio... ASP.NET project with master.page. I do it
Here's the issue at hand: I have developed an ASP.NET MVC3 application using Razor.
I have an ASP.NET application developed on my Vista box (IIS7). It works fine
I have a web application developed with ASP.net and C# that is running on
I am looking at globalizing an application that I have developed in asp.net mvc.
I am using asp.net MVC to develop an application that will have ajax interactions.
We have an ASP.NET application that manages it's own User, Roles and Permission database
We have an ASP.NET application running at a customer site that uses ActiveDirectory for
We have an ASP.NET application that uses the Infragistics WebSchedule control to display appointments

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.