I'm working with WPF application with local SQL database using Visual Studio.
I'm wondering about how can I install the database together with the application to make it work properly on another computer?
Sounds like you want to get your app working with SQLite, which is a database designed for a single application to store its data in.
There are many other types of embedded database, of course.
And if you need multiple people to use the database from separate applications, then you have to install the database separately, and you can't bundle the database with the application.
Related
I'm creating a desktop application using WPF (Windows Presentation Foundation) and ClickOnce, and in the application I compare strings from an uploaded file to strings stored in a database.
I'm not permitted to access the database from the application directly, so I need to store the list of database strings in the application, then update the list anytime changes are made to the database (The whole application would need to be updated each time the database changes).
What would be my best option to implement re-reading the database and updating the list of strings in the application?
I'am programming a Windows 8 Store App (Metro Design) with C# and XAML using Visual Studio 2012.
There is no need for a database server with multi user support etc.
I want to store my data in a local database and don't know which database is suitable for my needs.
Maybe SQLite? Or are there solutions that fits better for Windows Store Apps and integrates better in Visual Studio?
The app is kind of a calender and the database should store the user data that consists of the dates, tasks and so on.
SQLite is supported for WinRT.
http://visualstudiogallery.msdn.microsoft.com/23f6c55a-4909-4b1f-80b1-25792b11639e
SQLite is the recommended database to be used for Win 8 Apps.
Links for implementing the same
http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx
http://code.msdn.microsoft.com/windowsapps/Using-SQLite-Asynchronously-b8372137
https://visualstudiogallery.msdn.microsoft.com/23f6c55a-4909-4b1f-80b1-25792b11639e
Ok, this is a great question that I had to learn the hard way. By default WinRT applications do NOT have access to, directly at least, to any type of database structure. This means no Express, Compact, CE, SQLite etc.
There are three ways around this. Do not use a database and instead use a local file structure where you store and retrieve your data. XML works very nicely with this because you can maintain many of the same features a database would give you.
The second option is to use IndexedDB. It is similar to a cookie style local storage model where files are saved in your apps local apps folder.
The third and final option is to use web services. WinRT does have access to the internet which means you can write API and WebServices that can be called. This does mean that you need to have a server running which is connected to a master database. When your app needs data it calls your web service and obtains what it needs.
Overall, for the application you are describing the first option may best suite your needs. Keep a local XML file in your apps folder and read/write from it.
My question was marked as a duplicate of this question (although it was about C++ not C#). I thought I should still post my findings here. C++ apps have another alternative:
Extensible Storage Engine (ESE)
The list of all such API available for Store apps can be found on this link under the section Jet.
As one of variant:
Devart LinqConnect for Metro – a fully-functional high-performance ORM solution for developing Windows Store applications using either of LINQ or ADO.NET to access data.
http://code.msdn.microsoft.com/windowsapps/A-Simple-Windows-Store-85f29843#content
or next link can be usefull to
http://social.technet.microsoft.com/wiki/contents/articles/18417.windows-store-app-with-a-sqlite-database.aspx
Basically all I want is to be able to create like a self contained database in my Windows Forms application, I do not want to connect to a server or anything like that with SQL Server, I just want like a small database in the application that can handle a few transactions.
Like for instance if I create a Windows Forms application then it would have its own small database in it and when deploying it.. it will save rows there and stuff. I remember hearing about a plug in, it started with a CT or something don't recall, but it would be a plugin for Visual Studio.
Any help would be much appreciated.
Regards
You can use SQL Server Compact or SQLite (ADO.NET provider is available here). Both are embedded database engines that run in-process. You don't need to install anything, just include the appropriate DLLs with your application.
Visual Studio has no problem providing you with just such a database. Just right click your project, add new item, and select SQL Server Database. The database created will be part of your project and can be deployed as needed.
If you have a limited amount of data you can just right-click the project and Add a DataSet. Then you can define multiple tables in the .xsd and store multiple rows. in the .xml. Then you can write some simple code in the .xsd code-behind to auto load and save defaults and even pull back rows of data. I typically use this approach for storing a single record in each table. It will also work with multiple records in each table. There's a point where if you start to get a lot of data you'll probably wish you had used something like SQL Compact Edition or something similar that you bundle with your app.
you can use sqlLite,this is the website
http://www.sqlite.org/
or you can use access too
So I'm using C# 2010 Express and wondering what the best toolset is for developing a C# project with a MySQL backend? I know what if you use SQL Server Compact edition from within C# it will let you access the DB directly from the IDE. Is there a similar way to integrate the development with a remote MySQL Database?
Also, is MySQL a versatile enough solution for writing a program with C#? I am looking to build a seperate PHP web site (a reporting portal) that will access the MySQL data. I'd love to go open source all the way, but it seems like C# is the best app to create the app I'm trying to create (touch screen interface for data entry).
Whenever I program a database related homepage I always use HeidiSql and mysql. Both of them are easy to figure out and fast to use.
From their site:
HeidiSQL is a lightweight, Windows
based interface for MySQL databases.
It enables you to browse and edit
data, create and edit tables, views,
procedures, triggers and scheduled
events. Also, you can export structure
and data either to SQL file, clipboard
or to other servers.
All you do is install Mysql, set up a pass and username. and it's up and running.
Then all that's left is to install Heidisql. Heidisql it is a free program. If you need more details on how to attach heidi to your database please do write again.
There is
http://www.devart.com/dbforge/mysql/fusion/
But it's not free and is a plugin which you can't use with Express. There is no way to do this with Express as you can't add onto the basic functionality.
This might be a stupid question but I'm new at all this.
I want to create a Windows program that communicates with a database. Is there any way to do this without the user of my program have to install a database program like MySql?
I'm going to program it in C#.
You can use embedded databases like SQLite or Firebird Embedded.
You can find the full list of embedded database solutions on wikipedia page
SQL Server Compact works for you. But it doesn't support some functionalities. But you don't need to install a seperate database server. It works embedded.
Since you mention MySQL: MySQL Embedded Database
(It's not free, though.)