Using a Collection for permanent data storage

MRCP

Newcomer
Joined
Aug 25, 2003
Messages
11
I need to store a large amount of data in an easily searched and referenced way. After reading my VB.Net books, it seems like creating several Collections would fit my needs perfectly. However, I am not sure how one goes about creating Collections that would be permanent(ie not lose all the data in them every time the computer is shut down or the program is restarted. Can anyone help me with this? I am quite the beginner at programming VB.Net. Or if there is another(better) way of doing the above, please let me know.Thanks!
MRC
 
MRCP,

Don't use a regular collection. Although you could populate the collection, serialize it into text, and write the text stream to a file and reload it if neccessary.

Why do that when you can enjoy the benefits of good old fashioned ADO.NET?! (okay, maybe not so old fashioned.)

Just create a Typed DataSet, throw your information into it. Write the xml to a file, and reload it when needed.

You will get a whole lot of extensibility this way. Also, you also get a table stucture that will help you move your data to a database in the future.

Have fun.
 
Thanks for the response. I have Visual Studio.Net installed on my computer and have been using VB.Net through that to build my program. Is ADO.NET included with this or do I need to get additional software? If this is a dumb question forgive me, I am new at this. I had been considering getting Microsoft Access as I have heard this is often used to build databases. But if ADO.NET will work for me I will try that first, especially if it is already included in Visual Studio.Net. Thanks!
MRCP
PS If it makes a difference my program needs only to function at a local level, will not need to access or communicate with remote servers or via the Internet.
 
Back
Top