Visual Basic Data Storage

tboneuls

Banned
Nov 17, 2001
384
0
0
I need to write a program to store lots of data. I could use text files and such, but it seems that it would get a bit messy with the amount of data I am dealing with. Any reccommendations?
 

tkdkid

Senior member
Oct 13, 2000
956
0
0
Use a database.

Look into MySQL, SQLServer, MSDE (the free version of SqlServer), oracle, or oracle personal edition (free version of oracle).
 

tboneuls

Banned
Nov 17, 2001
384
0
0
Can I getsome more details about integrating one of thoise with vb? i want something simple... io dont need to store that much data.... thanks
 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
why do you tell us what kinda of data you are going to be storing...and I have used SQLServer as a backend to a few VB6 apps and it was quite easy
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
I'm sure VB has some means to serialize objects and write them to a file, that might be more appropriate than a DB.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
use some kind of a database. it'll help you structure your data a lot easier than with files.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
Originally posted by: BingBongWongFooey
I'm sure VB has some means to serialize objects and write them to a file, that might be more appropriate than a DB.

VB .NET has great support for serializing objects. VB does not. It is possible to write your own serialization for each object, but since VB is mostly built around COM concepts, you end up with a bunch of interfaces that generally don't have a good way of inspecting the contents of an object.
 

tboneuls

Banned
Nov 17, 2001
384
0
0
I have Visual Basic 6. I want to distribute this program to computers on seperate networks, and it needs to be as small as possible. Is there some sort of built in database managing in VB?
 

BennyD

Banned
Sep 1, 2002
2,068
0
0
just use type structures and a text file, make sure you make the type a fixed length (no dynalic arrays ect)

i have used this to write my own simple database of sorts
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: oog
Originally posted by: BingBongWongFooey
I'm sure VB has some means to serialize objects and write them to a file, that might be more appropriate than a DB.

VB .NET has great support for serializing objects. VB does not. It is possible to write your own serialization for each object, but since VB is mostly built around COM concepts, you end up with a bunch of interfaces that generally don't have a good way of inspecting the contents of an object.

Not true. Serialization is just a formal name for a concept, and you can just as easily stream the contents of a Collection in VB to a file as you can in VB.NET. The utility of serialization in .NET is obviously greater than that of VB, because VB has most traditionally been used in the context of database applications.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: tboneuls
I have Visual Basic 6. I want to distribute this program to computers on seperate networks, and it needs to be as small as possible. Is there some sort of built in database managing in VB?

No. tkdkid's suggestions were appropriate, and I suggest you look at either MSDE or Access. Do you have access to Access (pun not intended)? You can distribute the database itself and use it within VB without the need for either the Access runtime/retail version. You can do the same with MSDE, but the deployment and subsequent maintenance of MSDE is a horrible pain.

If you are going to be storing a lot of records, you really do need to use a database; serializing pseudo-object hierarchies from VB will require a lot more plumbing than I'm sure you're willing/wanting to write.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
Originally posted by: Descartes
Originally posted by: oog
Originally posted by: BingBongWongFooey
I'm sure VB has some means to serialize objects and write them to a file, that might be more appropriate than a DB.

VB .NET has great support for serializing objects. VB does not. It is possible to write your own serialization for each object, but since VB is mostly built around COM concepts, you end up with a bunch of interfaces that generally don't have a good way of inspecting the contents of an object.

Not true. Serialization is just a formal name for a concept, and you can just as easily stream the contents of a Collection in VB to a file as you can in VB.NET. The utility of serialization in .NET is obviously greater than that of VB, because VB has most traditionally been used in the context of database applications.

All I said was that the support for serialization in VB (6) is not great. It is possible to write your own serialization, but it's nowhere near as good as in .NET where most classes can be serialized automatically.
 

tboneuls

Banned
Nov 17, 2001
384
0
0
I do have access to Access (hmmm). How easy is it to integrate and modify the database from within VB? This is one aspect of VB I have not yet had to deal with.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: tboneuls
I do have access to Access (hmmm). How easy is it to integrate and modify the database from within VB? This is one aspect of VB I have not yet had to deal with.

To manipulate the database you'll be needing to use ADO. It would also be helpful to have a handle on SQL, but ADO abstracts the CRUD (create, read, update, delete) operations traditionally performed with SQL. Using ADO isn't something you'll be able simply ask how to do, so I suggest researching the link above.

Is this a new program? Have you considered .NET? ADO and VB are unfortunately considered almost antiquated, so it would be more beneficial for you to invest your time into learning .NET and ADO.NET.
 

tboneuls

Banned
Nov 17, 2001
384
0
0
Originally posted by: Descartes
Originally posted by: tboneuls I do have access to Access (hmmm). How easy is it to integrate and modify the database from within VB? This is one aspect of VB I have not yet had to deal with.
To manipulate the database you'll be needing to use ADO. It would also be helpful to have a handle on SQL, but ADO abstracts the CRUD (create, read, update, delete) operations traditionally performed with SQL. Using ADO isn't something you'll be able simply ask how to do, so I suggest researching the link above. Is this a new program? Have you considered .NET? ADO and VB are unfortunately considered almost antiquated, so it would be more beneficial for you to invest your time into learning .NET and ADO.NET.

Why is VB 6 considered so outdated? An will ADO work well in VB6?
 

PowerMacG5

Diamond Member
Apr 14, 2002
7,701
0
0
Originally posted by: tboneuls
Originally posted by: Descartes
Originally posted by: tboneuls I do have access to Access (hmmm). How easy is it to integrate and modify the database from within VB? This is one aspect of VB I have not yet had to deal with.
To manipulate the database you'll be needing to use ADO. It would also be helpful to have a handle on SQL, but ADO abstracts the CRUD (create, read, update, delete) operations traditionally performed with SQL. Using ADO isn't something you'll be able simply ask how to do, so I suggest researching the link above. Is this a new program? Have you considered .NET? ADO and VB are unfortunately considered almost antiquated, so it would be more beneficial for you to invest your time into learning .NET and ADO.NET.
Why is VB 6 considered so outdated? An will ADO work well in VB6?

VB6 is getting to be pretty old. I believe it came out in 1997.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
I remember using VB6 in a high school programming class probably over four years ago. For years ago, people were arguing about how windows 98 was better than windows ME :p