How to update Database Using Database first approach [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have been trying to update the database when we deploy the application on the client's machine using sql queries. Now i want to update the database automatically. Is there any way to do this, i have heard of SQLMigrations but they say that it can only be used with Code first approach. Can anyone shed some light on this topic

You can use a Database Project in Visual Studio. With Database Projects, you can generate SQL Scripts for any existing database, you can create difference (update) scripts, you can add SQL scripts of your own, etc.
Database Projects are extremely handy in many scenarios. Check out this link on MSDN: http://msdn.microsoft.com/en-us/library/xee70aty.aspx
There is also guidance on CodeProject about this: http://www.codeproject.com/Articles/245612/Creating-a-Database-Project-with-Visual-Studio
You'll love it!

Related

How to make a plug and play WPF app create a SQL database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm currently learning WPF with the goal of making a simple app for a friend. This app will make use of a database and the PC were it will run won't be connected to the internet.
I know how to make a simple database using the server management studio, and how to connect to it in my code. But so far, all tutorials/docs I've seen only talk about making use of a database in my pc, but in the case when I finish said app, how I go about setting all of this up in his (or any other)?
The end goal is for the app to be 'plug and play' and that the database files can be easily backed up.
I don't expected a step by step process! Just some direction for where to look for would be more than enough... thank you.
Use an SQLite DB, can be part of the App

Save data into local database in visual studio 2019 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I created a windows form in visual studio 2019 and l connected it to local database....but when l rebuild the project all the data removed from the database..why??
As commented on your question, it's not very clear how you are implementing the database.
I'm going assume that by the fact the data is not persisting that you are using a SQL Database file?
If this is the case then you want to make sure that you are not copying the DB to the output directory every time you build
If you are looking for data to persist across sessions then it would be better to host a local SQL Server. Check out Tim Corey's guide to SQL Database management and C# https://www.youtube.com/watch?v=ijDcHGxyqE4

View an Entity Framework database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am currently learning about APIs in general and I want to make a simple api that can be able to receive and send requests. I created a simple API using ASP.NET Core and the Entity Framework in order to use and save data to a local SQL Server.
This is the tutorial that I used in order to create the database.
However, I am now wondering if there is a way to view the database tables and their contents like in phpMyAdmin. Is it possible?
In Visual Studio you can view it by clicking Tools > Connect to Database.
Find your database table and right-click to get the option to view the data.
Personally I use SQL Server Management Studio to connect and view my data.
Find it here.

Edit a MSSQL table from web [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm trying find out what is the best solution for making a single table in a MSSQL database available for insert and update for a few users from a html interface.
I've got IIS server, reporting services, C#, visual studio and most microsoft tools of the 2008 version.
In php/mysql I would deploy a framework for editing tables. Whats the easiest MS solution?
Thank you
If you just want to perform edit, delete operation on front end, you can use grid view tool from asp.net.
you can find details at the following link,
http://www.aspdotnet-suresh.com/2011/02/how-to-inserteditupdate-and-delete-data.html
Hope this will help you.

problems in SQL data could be due to a bad executable [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Using c# software for 3 yrs. Now, since 14th of august there is a problem with a table named summary having a column named jcdate which keeps updating itself to the 14th of august on its own.
Even if I pass a query to change the date it gets back to 14/08/2013 in a few moments.
Can it be due to a corrupt executable?
While it's impossible for the S/O community to know what is communicating with your database if even you don't, there is something you can do to possibly help. You will need to profile your database using a sql profiler tool if there is one available for your database. SQL Server, for example, uses a tool aptly named SQL Profiler. With a profiler tool, you can monitor all I/O that is occurring on your database. A little detective work will be involved, but I believe this is the direction you need to be going.

Categories