I'm totally new to Windows 8 programming and I am writing Diary application for Windows 8 on C# right now. It stores diary's notes which user writes. The question is following: how do I store this notes so that user (and program) can easily access any of them via dates? I've thought of storing each of them in a separate file or all of them in one, but this seems not a good idea for me. Using some sort of local database would be nice, but is there anything like this among inbuilt Metro development tools?
You can use SQLite as your database: http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx
Related
I'm currently working on WPF App which is calculating things for long string and storing this values in decent variables. By now im storing this values in my local SQL database and showing it by datagrid in WPF window. In the future i want to use this app on others computers, every user would be able to store their values from strings. In this way other users won't be able to use this, because there is my connection string and no database mine database. I need a solution for this. What is the best way to store this items, considering this app would be run on many machines? I need 2 options (FREE users - storing localy in theirs PCs, and Premium (online database, maybe Azure would be ok?)
XLS is only for Excel instaled user, i won't to use this way
Maybe a embeddable database like SQLite should do the trick
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
Please answer for Dummies ;) ... Absolute newbie to web programming, especially new to Drupal. We have some modules written in C#, that access a database in MySQL and works on it (it's a student information system actually. We have some forms created in C#, through which interface student's can enter their details onto the database and we have desktop applications which work on those data). Now we need to create a website so that student's can enter information through the internet. We can not re-write the whole modules in PHP, and we want to use Drupal to create the website. So how to do that?
Not really a direct answer, but some points that you need to consider. How complicated this will be depends on how much interoperability you need between the C# code and Drupal.
Does Drupal need to use the forms written in C# in order to enter the data in the DB, or could data entry be done directly from PHP (As in, is there any validation or processing of data in the C# forms that needs to be done?) If not, it seems like the easiest way would be to build a page in Drupal that can enter the data directly into the MySQL database.
Otherwise, the easiest way to get the programmes to talk to each other might be outputting the data to another format — e.g. XML or JSON. (Here's a similar question with someone using JSON as the intermediary data type) You could have your PHP form create an XML document in a temp folder, with the C# programme polling this folder for new files every X minutes and use them as an input into its application.
It will really depend on your workflow — how immediate does the processing of data need to be? Is the flow of data in/out, or in only — i.e does there need to be a set of results returned to the user?
I am working on a windows app. The user has to register first to use this application. So in order to store user information, I am using MS-Access as a database. There is not much information to be stored as this application will be on individuals machine. There are few settings and some user information to be stored.
What I am feeling is that with the use of MS-Access, my application will be dependent on other application as MS-Access. It is not necessary to have the MS-office on the end user's machine.
So can you suggest me the best way to store the data safely without any dependence.
One thing I want to clear is that, the information will be of different types like it will consists of user information, some folder/files paths and some other information. I would like to keep these information separate from each other.
Thanks
Abhie
I think I found the solution.
Best practice to save application settings in a Windows Forms Application
I hope this will help others facing same problem.
Stackoverflow Team You are doing fabulous job. One suggestion; can you put some chat option for developers to discuss their problems. I think this would make it more easy to find answers to complex problems...:)
Regards
you need to include Access Database Engine drivers in the client PC, in order to connect it .
MS Access Database Engine
If you're using .NET, the best bet for getting the recommended folder locations for application data (e.g. your mdb file) is probably best retrieved using Environment.GetFolderPath
See:
http://msdn.microsoft.com/en-us/library/system.environment.getfolderpath.aspx
You're likely interested in ApplicationData or LocalApplicationData for user specific data or CommonApplicationData for data shared by all users as your storage location (and then the proper company / product subdirectories appended to it).
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.