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 695715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:59:17+00:00 2026-05-14T02:59:17+00:00

A have an app with that uses an SQL database. The application is already

  • 0

A have an app with that uses an SQL database. The application is already released, but now I’m working on an update. In the update I’ve added an extra column in a table of my database.

I’ve create the database from my DMBL using DataContext.CreateDatabase() (not the other way around, as I found out to be the more common scenario later)

I there a facility in LINQ in which I can update my SQL database scheme?

  • 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. Editorial Team
    Editorial Team
    2026-05-14T02:59:17+00:00Added an answer on May 14, 2026 at 2:59 am

    No, sorry. I also would like to have such a facility. You have to upgrade your database by hand.

    Here’s the Method:

    • Create a Stored Procedure called something like “spGetDBVersion”. This Procedure just returns an Integer of your current deployed Database version.
    • At startup/installation time check that procedure if it’s result matches the version your Program expect.
    • If not -> execute update scripts in the right order. Example: if spGetDBVersion returns 2 and your application expects 5 then you have to execute Update_To_3.sql, Update_To_4.sql and Update_To_5.sql

    Hint: After the initial release I never change my database schema with an tool. I always script that change and put that in my next update script.

    Not that what you’ve asked, but it’s a practicable solution.

    An UpdateScript may look like this:

    ** PSEUDOCODE**

    -- Update to version 2
    alter table [MyTable] add newColumn int null
    GO
    update [MyTable] set [newColumn] = 0
    GO
    alter table [MyTable] change newColumn int not null
    GO
    alter procedure spGetDBVersion
    as
    begin
        select 2 as CurrentVersion
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple app that uses an SQL Express 2005 database. When the
We have developed a .NET web application that uses SQL Server as a backend.
We have a WinForms application that uses SQL server to store its data. To
My preliminary research says no. I have a database app in SQL Server that
So, I have an app that uses a SQL Server express db. I have
I have a click once app that uses SQL CE 3.5, which is set
We have an app that uses simple one way binding with a GridView to
I have a Cocoa app that uses a WebView to display an HTML interface.
I have a rails app that uses heavily js (over 1MB total). I'd like
I have a Rails app that uses STI to handle different types of Users,

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.