Click here to Skip to main content
15,911,360 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

Can anybody tell me how to save & retrieve data from local directory or PC's local disks without using database. Which is the better way to do it..? As the client system doesn't have a database so i need to use an alternative to save data & retrieve it whenever required from the windows application i am trying to develop. I need something like whenever i want to read data i should be in a position to import data & when writing i need to export data.

Thanks in advance,
Posted
Comments
Maciej Los 6-Aug-13 2:46am    
Have you heard about XML files?

There are a huge number of ways you could do this, including a raw file, CSV, and XML among others, but since you are talking about databases I assume that you need some form of record based storage.

The simplest solution is to use a database - there are several which do not require user installation and which have a small footprint. Have a look at SQLCE and SQLite: both install with your application as small DLL files and allow you to use (nearly) all the features of SQL Server in a single user form in your application. Or, if you are desperate, there is Access/Jet/Ace which can do a good job single user.

If you need multi user access, then you need to bite the bullet and install a "proper" database: Sql Server of MySql as otherwise it gets far too complicated to process youself!
 
Share this answer
 
Comments
Yesudasan Moses 6-Aug-13 2:56am    
What is Tally Like softwares are using ??
They are using Files, and still it supports Multi User heavily...
You have any Idea ??
Jagadisha_Ingenious 6-Aug-13 2:59am    
@OriginalGriff: Access/Jet/Ace are good options, i want to know how much amount of data can they store in them..? What would be the limitations involved in it..? Will it slow down the process(read/write) if there are more number of data in any of the above mentioned databases.
OriginalGriff 6-Aug-13 3:12am    
I believe ACE has a 2GB limit (and Jet is superseded by ACE, it had only a 1GB limit), though to be honest I haven't explored up near that size - I'd move to SQL Server Express long before that because it's unlikely that any one user will want that to himself. (You can use JET/ACE as multiuser but it's a PITA and can cause huge problems, particularly as the record count grows.)

For smaller apps, I normally used SqlCE, but am moving to SqLite as the DB is Android compatible - which is becoming more important to me.
Maciej Los 6-Aug-13 3:13am    
Agree! Fully answered ;)
Use XML Files....
You can simply write or read it with DataSets or Tables....
Using XML in C# in the simplest way[^]
or use CSV (Comma Seperated Value) Files....

If you want to save Application Settings or a few values.... Use App.Config in project....
 
Share this answer
 
v3
Comments
Maciej Los 6-Aug-13 3:05am    
The idea is OK, but referenced article - poor ;(
you can try saving it in notepad

how-to-save-data-in-notepad[^]

Check this..
 
Share this answer
 
Comments
Maciej Los 6-Aug-13 2:53am    
In notepad??? I believe you're talking about text files...
[no name] 6-Aug-13 2:54am    
yes...it's a text file only..
Maciej Los 6-Aug-13 3:10am    
Referenced article is useless in this case. It shows only how to append text (without any structure) into existing file, but does not allow to edit/update, etc.
A 3!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900