question

GaneshGebhard-8778 avatar image
0 Votes"
GaneshGebhard-8778 asked iSuffer-4034 answered

Unable to update local SQL Database with Preview Database Updates

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-wpf
image.png (36.6 KiB)
image.png (6.2 KiB)
image.png (50.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey There! Did you ever figure out why this is happening? I have been dealing with this issue for a long time. It works sometimes and then it doesn't. Please share if you have a solution.

Thanks.

0 Votes 0 ·
DuaneArnold-0443 avatar image
0 Votes"
DuaneArnold-0443 answered

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://docs.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://docs.microsoft.com/en-us/answers/products/sql-server

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

iSuffer-4034 avatar image
0 Votes"
iSuffer-4034 answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.