|
-
Mar 16th, 2000, 10:42 PM
#1
Thread Starter
Fanatic Member
Greetings all.
In VB, there are many ways to save program data, e.g. in a database like Access or SQL, a text file, INI Files or the Registry, etc.
Can someone please give some basic guidelines on when to use which method? Which is more efficient and better at insuring the integrity of the data? Also, which method is better when it comes to installing apps? For example, if you use ADO rather than some other method, will the overall installation of the app be larger because of the additional runtime files needed?
Thanks for your input.
-
Mar 17th, 2000, 01:05 AM
#2
Hyperactive Member
Hi OneSource! Just some of my opinions here.
I do not like using text or .ini files to store anything other than error logs or other small, easy to handle data. A database such as Access or SQL or even a simple database such as Excel provides a much easier way of handling and managing the data when developing the program. Imagine if you used a text file with 70,000 records and you need to look for a particular record to see exactly how it is appearing in the DB. You would waste a lot of time.
I do believe (although someone correct me if I am wrong ) that using ADO will make the application size larger. Other methods such as DAO are simpler to use and require less space, but they have their drawbacks. In a program that I have just finished, I decided that it will be the last one that I develop using DAO and I will use ADO from now on. The reason is that my program that I just finished can only be used with an Access database, and I can't sell it to a client who wants a database in Oracle ADO provides the greater flexibility.
Other folks, please pitch in here?
Andrew
-
Mar 17th, 2000, 03:56 AM
#3
Thread Starter
Fanatic Member
Thanks DrewDog...
Anyone else have any thoughts? By the way, DrewDog, you didn't mention your thoughts about saving to the Registry.
-
Mar 17th, 2000, 06:15 AM
#4
transcendental analytic
Hi there!
In VB there are many ways, but in qbasic (wich i leaved a half decade ago), you just have to do everything manually. So after much experience with saving data in my own formats, for instance .dsf and .tos, i never had any need for use of databases or the registry. Storing your data manually does not neccesarily mean the txt and ini writing. Opening files in random will give fast access and customization is unlimited. I use databases when i need, and that is when i have to. About the registry thing:
Not recommended. If you need to save the window size or any other tiny info, it's an option but still I use it only if there is nothing else to store. Also small singleexefile programs can be easyer to transport if they don't have any annoying inifiles around.
Ini files are recommended when you write a program that handles the inifile as a script, that you can change easily notepad
-
Mar 17th, 2000, 03:34 PM
#5
Conquistador
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|