Using MS Access 2000 database (mdb) in Visual Basic 6
Posted on 2004-09-28
I have a MS Access 2000 database containing a table.
The table has 10 fields which are of textual or numerical format.
What is the best/simplest/most reliable way for me to connect to this database in Visual Basic 6?
These are some functions I'd like to be able to perform on those databases:
- get the data under some Row/Col coordinates in a table
- change the data under some Row/Col coordinates
- add new columns (Records)
- delete existing columns
- search the table for some data
I'm not very familliar with Access and database programming, and I'd like to keep it as simple as possible.
I'm using the database only becouse I'm planning to have a large amount of data which is too difficult to manage using text files or similar "home-made" methods.
My first attempt to do it was to use Adodc and DataGrid controls to display a table, but I'm wondering if this is the good approach.
It gave me the ability to view and modify the exitsing data, but I was unable to find a way to add new Record (Column) or delete the existing one.
Also I didn't find a way to search through the table.
(There is a way to loop through all cells, and compar the data in each cell with the word I'm looking for, but I'm affraid it will become too slow as the database grows.)
Do you have any suggestions on how to connect to database and be able to perform these simple operations?