Need help in application update - c#

I am developing an application in SQL Server using C#.
My database version is SQL Server 2005 Express edition, and .Net framework 2.0.
I want to make an updatable application.
e.g. whenever I do some changes in my application, then it should be available to update in all locations (like update in Mozilla Firefox).
But I also want that if I change some columns/stored procedures of the database, then those changes should be also updatable.
Please guide me how can I make that kind of setup.

Do you have any server or network share where you can distribute your application from?
If so, then you should take a look at ClickOnce which is available in any version of visual studio. it will automatically update the client each time you publish a new version. http://msdn.microsoft.com/en-us/library/t71a733d%28v=vs.80%29.aspx
As for the SQL updates, I'm not sure what you're asking for? if you use one database for many clients, then the only thing you will have to update is the client code which works with the database. in which case you will do the same thing as with any client update.
If you're having multiple instances of the database, you'll have to update each of them manually. You'll really want to keep track of each change you've made or use a comparsion tool for that. I'm using Red Gate SQL Compare, but I assume that there are also free tools.

First you need to decide on a setup tool which will create an EXE or MSI installer for your application. Perhaps this list will help: http://en.wikipedia.org/wiki/List_of_installation_software
After that, you can integrate an updater application into that installer. Here is a post with more details: What is the best way to auto update a windows application?
An installer takes care of the distribution and the updater takes care of your application updates.

Related

How to connect to LocalDB in a .NET 5 project?

I am writing a console application using .NET 5, and I am using a LocalDB instance (at least I hope that's the right terminology) to store the data that the application needs. I can see the database (including both tables and all the data in said tables) in both the Server Explorer and SQL Server Object Explorer tabs of Visual Studio 2019, but the Data Sources tab the only thing that shows is the text "This window is not supported for the selected project."
The problem is, all the tutorials I've been able to find rely on that Data Sources tab. From looking at other questions here on Stack Overflow, it looks to me like that tab is deprecated with .NET 5? Am I correct? And how would I write the code to access the database and perform CRUD operations without the Data Sources tab?
Sorry if this is a stupid question; this is my first time using LocalDB.
You should use SQL Server Object Explorer. If you right click on the database that you want to connect, you can see the properties, including connection string. If you have trouble with incorporating Connection string into your code - you need to show the code and the problem.
Whether Data Sources is deprecated or not, as you can see it is not supported for most projects (I think it's just for Windows projects - but I may be wrong). Anyway - you don't need it. And by the way - this approach works regardless of the database you use (LocalDB, SQL Express or regular SQL Server)

Windows Forms Application Standalone database

I am planning to create a windows forms application with standalone database.
When i tried to add a new database item in Visual Studio i can see a Dataset and Service-based Database. Could you please let me know which one should i use or is there any other db i can use.
You can use sqlite.net:
https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki
It is pretty straight forward to use. You need to add the appropriate DLLs to your project.

Embed Database to WPF application

How to embed a database to a WPF application?
scenario: this is our school project and we are required to create a
system with a database. now, i have done the fundamentals (create a
database, creating a layout and the c# code for programability) but
now, when we are to transfer the build onto a different computer, the
database seems to be lost.
I'm using Visual Studio 2015 with SQL Server for its database and that database is placed within the localdb of my computer. what i want is a portable system so that we can present the system anywhere without the hassle of bringing my desktop to school.
thanks in advance <3
EDIT: there are a ton of ways to connect a database to a wpf
application and i dont know what to choose. theres the ling-to-sql,
entity framework, data source etc. which of these methods will be the
best way for a portable application with the database in it.
my WPF app uses SQL Compact + Entity Framework (code first) + migrations, yo can find sources here https://github.com/tym32167/arma3beclient
All database-related things placed in this project https://github.com/tym32167/arma3beclient/tree/master/src/Arma3BE.Client.Libs
Data context here https://github.com/tym32167/arma3beclient/blob/master/src/Arma3BE.Client.Libs/Context/Arma3BEClientContext.cs
Migrations here https://github.com/tym32167/arma3beclient/tree/master/src/Arma3BE.Client.Libs/Migrations

Using a local database

I'm busy writing a small app and I only want a database to load small amounts of data, in other words I don't need the functionality of SQL.
So I've installed filehelpers, but it seems very limited in the sense that I can read/write and even append data, but it seem impossible to delete one row of data in a table?
Does anyone know how to do this with filehelpers or point me to a different solution where I can just add a local db to my app without any other external software required?
PS. My visual studio does not have the "create local db" from the item selection.
For something like this, I'd use an embedded SQLite database. It gives you the best of both worlds, one file database for local data and most of the features of SQL.
See here: https://sqlite.org/
On their download page, they have lots of stuff and a plugin for VS:
https://sqlite.org/download.html

How to make a quick interface to edit / delete / add the database?

I have the database mysql.
I need to access it via a desktop application with the ability to change does not have value.
in asp.net is there, this dynamic data filter, I need the same thing but in WPF.
Visual Studio has lots of easy tools to help you integrate your SQL Server into the application from using things like the DataGridView to the DataRepeater take a look at this article http://www.codeproject.com/KB/WPF/wpfviews.aspx it should help you get started. Using LINQ to assist in speed application development.
Another Great link: http://dotnetslackers.com/articles/wpf/WPFDataBindingWithLINQ.aspx

Categories

Resources