Unable to update local SQL Database with Preview Database Updates

Ganesh Gebhard 366 Reputation points
2021-01-24T01:47:38.72+00:00

Hey!

I'm new to using an local SQL database in my WPF C# application and I face an issue with this.

I have added the following database and table (with only the id in there):

59872-image.png

Now I wanted to update this database with a bit more than only 'id' and I wanted to change the name of 'id' to 'id_details', but with both I keep facing the same issue over and over again: when I press 'Update' it keeps loading on Preview Database Updates and it remains like this for hours:

59844-image.png

59845-image.png

What am I missing here? Am I doing something wrong? I hope someone can help.

Best regards,
Ganesh

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,679 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Duane Arnold 3,216 Reputation points
    2021-01-24T23:13:22.5+00:00

    I suggest that you download and learn how to use MS SQL Server Manager Stuido to administer a MS SQL Sever Express MDF file or the MS SQL Server database.

    https://www.jetbrains.com/help/datagrip/connecting-to-sql-server-express-localdb.html#step-3-configure-the-localdb-connection

    Note: that your program is using MS SQL Server Express LocalDB

    The Database1.mdf is a standalone MS SQL Server Express Localdb database that is used in software development mode, which would need to be further configured to be deployed with the program when program is deployed.

    https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15#:~:text=Microsoft%20SQL%20Server%20Express%20LocalDB,Server%20Express%20targeted%20to%20developers.&text=LocalDB%20installation%20copies%20a%20minimal,using%20a%20special%20connection%20string.

    I suggest that you either get a good book or find a good online tutorial on how to install and use MS SQL Server Management Stuido.

    I also suggest that you do the same in learning the basics of how to administer a MS SQL Server database, get a good book or online tutorial.

    They can help you in the 'General' forum.

    https://learn.microsoft.com/en-us/answers/products/sql-server

    0 comments No comments

  2. Heinrich Conradie 1 Reputation point
    2021-05-27T22:55:14.96+00:00

    I had the same problem, I'm sad to say the solution that eventually worked for me was to restart my computer. Also maybe first add all the columns you want in your table before you hit update for the first time.

    0 comments No comments