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

  • Home
  • SEARCH
  • 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
  • 0 Views
  • 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

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer One DataContext per application would perform badly, I'm afraid. The… May 11, 2026 at 3:52 pm
  • added an answer Q1 A) No, they keep their filename and are outside… May 11, 2026 at 3:52 pm
  • added an answer The jQuery validation plugin allows you to customize it's error… May 11, 2026 at 3:52 pm

Related Questions

I'm a .NET web developer who has just been asked to produce a small
Ok, so I'm looking for a bit of architecture guidance, my team is getting
I am working on a software development project that uses code written primarily in
I have an ASP.NET application developed on my Vista box (IIS7). It works fine

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.