Jump to content
Sign in to follow this  
Reaper HGN

Where do you keep your data?

Recommended Posts

Reaper HGN

I have been on the forums for a while now and have seen examples of people's programs with Access, SQLite, XML, registry, binary files and a few others. All of these choices seem to have their benefits and disadvantages. I was wondering what people's "go to" data storage choice is?

Share this post


Link to post
Share on other sites
simbo

I have been on the forums for a while now and have seen examples of people's programs with Access, SQLite, XML, registry, binary files and a few others. All of these choices seem to have their benefits and disadvantages. I was wondering what people's "go to" data storage choice is?

How much do you want to store? I store almost everything in text files. I often omit the file extension if I want to discourage users from fiddling with things. .ini files can be worked with in exactly the same manner as text files (you don't need to use the built in functions if you don't want).

I always make sure I keep my data in a separate folder to the program files. That way, you can grant "everyone modify" proviledges to that folder, safe in the knowledge that it only contains benign text files

I find this much easier to keep track of that storing things in the registry.

Regards,

Simbo

Share this post


Link to post
Share on other sites
GEOSoft

My personal preference is INI files. I don't see any advantage to adding bloat to the registry since it's generally loaded with enough bloat anyway. I try to keep my INIs in @AppDataDir & "\some folder\". Text files can also be fairly quick to read. A database is as bad or worse than the registry and they tend to be slower than other methods as well as requiring more code.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Reaper HGN

Good points on the registry. In terms of total storage, I do not want to keep a ton of information, but likely more than ANYONE should put in the registry :D . In terms of ini files, I have used them, but I always use it with a single section. If you have to store an indeterminate amount, how do you increment the key/value pair in the file? Do you just make a simple key & $count variable and write it straight to the file? I am just wondering how you use it when the extent of the dataset is unknown (kind of like a flatfile database basically).

Share this post


Link to post
Share on other sites
rajeshontheweb

i prefer using ini files, but only with a different extension so that normal user is fooled and doesnt open it and edit it easily.

i personally feel adding data is easy in ini files rather than ordinary text files,because we could just count the sections and add a new section just like that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×