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 8 years ago.
Improve this question
I am trying to make an engineering program using C# language, the program requires input from the user to substitute it in the equations but the equations needs lots of constants and coefficients, for example, a frictional coefficient that varies with temperature, so I have tabulated this data in an SQL database table.
So my question: is it possible to make this table included within the application so that the program can be easily published and used so that users do not need to install SQL or any database program.
If using a database is not the right call to create such application how to do this ?
You can use SQL Server Compact for file based databases up to 4GB.
I believe what you're looking for is Visual Studio's SQL Server Project:
http://msdn.microsoft.com/en-us/library/84b1se47%28v=vs.90%29.aspx
To use it for your scenario, you would script out the database WITH data:
Generate script in SQL Server Management Studio
It probably won't load in < 5 seconds, but you can also set the db project to just be there & not load every time the project is loaded, then a dev can just re-enable the db project, publish it & disable it again.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 11 months ago.
Improve this question
I've created a multiple user application in WinForm and it have a database on the server which is on the other computer. So far, i set up the server database (MySql) manually and create each tables in the database manually as well. I was wondering is there a way to create (maybe an exe file) to automate the entire process?
I've did some searching on the internet but most of the answer i get are the configuration of the database which i've go through it when i did the manual set up. I developed the application and the database separately so what is related to the database in my application are the connection string only. i did managed to publish the application and now i need to find a way to publish my server database.
With mysql you cannot automate the install of the mysql software, unless you have a paid for enterprise licence or you release your software as open source under GPL.
To automate mysql installation, you can use mysql installer console.
What you can definitely automate is the deployment of your mysql data structure and the configuration of the mysql instance.
The former requires an sql script that creates the database and all other database objects (tables, indedes, views, users, etc) that you can execute as part of an install process. The latter requires overwriting or adding your settings to my.cnf / my.ini configuration files.
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
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 3 years ago.
Improve this question
Current connection string:
Data Source=DESKTOP-2LESKTC\\SQLEXPRESS;Initial Catalog=test_database;Integrated Security=True;Connect Timeout=5
I am building an application that is using a SQL Server database and is working fine on my PC when I run the .exe file of the WPF / C# application; but my problem is: how can I make the connection string (datasource) of SQL Server generic that my .exe file will automatically detect it whenever its installed on any new client PC?
I will add SQL Server dependencies but data source remains same in my code which is my current PC, how to change it in such a way that it can vary automatically when application is deployed?
There are many ways to accomplish that goal, however the most common is to make use of the ConfigurationManager that reads from an App.Config file that contains your connection string. You can then add App.config transformations for you different environments that contain connection strings specific to those environments.
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 3 years ago.
Improve this question
I have simple application design it by C# (windows form application) and the database is Microsoft Access, it work with multi users.
We have Share Drive in our PC ,I put the application and database on the share drive.
How can I protect the application and the database from the users until they do not delete or open it?
MS Access is designed to be slightly better then storing this stuff in Excel Tables, but not so good it will ruin the MS Business with SQL Server. If anything, it is about getting you "hooked on" using Databases.
I think this project plainly went past the scale that Access can support. You need to go to a proper Database Server to go any further - user rights included. SQL Server Express and MySQL should both be avalible and free of charge. And of course there are tons of other Options.
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 have Windows Server 2012 R2 and SQL Server 2016. There are many events writing to SQL table.
I want to build a web page to list events those are getting directly from connected SQL Server table.
Both SQL Server and IIS(8.5) are installed on the same machine.
The page would need to be dynamically updated whenever SQL Server table's record added/changed.
I really have no clue where to move on right now. Could anyone briefly explain me steps I need to do or throw me a proper "how to" article PLEASE?
Also, is there a way to performed without doing Visual Studio projects and such. I plan to automate the process with Powershell scripts.
This link should help you ...
https://msdn.microsoft.com/en-us/library/tw738475.aspx