please how can i create a database and link it to my VB6 application. i designed a VB application to hold bio-data that will be updated from time to time but am finding it difficult to create the access back-end for it. please any urgent help will be most welcomed.

Dani AI

Generated

A compact, practical supplement to the thread: the fastest reliable route for a VB6 “bio-data” app is a split Access backend (tables only) plus a small, stable front-end or client binary that opens the backend file by path. ’s note about using an Access Database project is useful when the DB is fixed; and steer correctly toward programmatic data access; ’s connectionstrings pointer is also relevant.

Key steps and design notes:

  • Create a desktop Access file (.mdb for Jet / older compatibility or .accdb for newer Access/ACE). Use an Autonumber primary key for the main record table and normalize: put addresses/phones in a related table if a person can have many. Keep text fields sized appropriately (avoid huge Memo fields unless necessary).
  • Store photos as file paths (images in a folder) instead of OLE objects — reduces bloat and speeds backups. Index fields that will be searched often (last name, email).
  • Split the database if there will be multiple users: backend = tables on a shared network location, front-end = queries/forms/reports or the VB6 client on each workstation. This reduces corruption risk and makes updates easier.

Typical VB6 considerations and a minimal example (DSN-less approach recommended):

  • Use a file-path connection string (provider choice depends on .mdb vs .accdb). Keep the DB in a writable, shared data folder (not Program Files). Automate compact/repair periodically and keep regular backups.
  • For small multi-user deployments (a handful of users) Access is OK; for heavier concurrency or larger data sets, migrate the tables to a server DB (SQL Server Express or similar).

Troubleshooting / cautions:

  • Access files can bloat and are prone to corruption if clients lose network connectivity during writes; limit simultaneous writers and perform frequent backups. Use transactions around multi-step updates and parameterized queries to avoid partial writes and injection risks.

Tying this back to the thread: ’s DAO route is fine when working closely with Access objects; ’s advice to master CRUD is essential. If details of the current schema or the code used to open the file are available, targeted adjustments (indexes, transaction scopes, connection strings) are the next practical step.

Recommended Answers

All 5 Replies

I am sorry friend, for it seems you have posted in VB.NET.

As for connections, you can find a good reference HERE

I will flag your post for the moderators to move to the correct section so that you will receive the correct help.

Thanks

There a few ways of using MS-Access databases with VB6, depending on whether you want to always use the same database or you want to choose which database at run-time. If you are always connecting to the same database, create a new Database project and connect to the database you created using MS-Access (Jet engine only). This will be the easiest way because you get all sorts of GUI help from the IDE.

If you want to decide which database you want to use at run-time, you can use DAO or ADO. DAO (Data Access Objects) is easier to use when directly connecting with an Access database. You can work with tables and queries in the database, but you can not use anything else, like forms and reports, that might be stored in the database as well. ADO (Advanced Data Objects) is better if you are using another type of database or going through ODBC.

Include a reference to DAO in your project. Create a module and put a Database object there; this way, all your VB6 forms can use the Database.

Public dbsProject AS Database

Also, it can be a good idea to create a Sub Main in this module which sets this to nothing.

Public Sub Main
    Set dbsProject = Nothing
    frmMain.Show vbModeless, Me
End Sub

Once you link in the DAO library, there is lots of information available in the help system. To add tables to your database, starting looking at CreateTableDef. To use the tables, look at OpenRecordset. For working with queries, look at CreateQueryDef. This can get you started working with DAO.

please how can i create a database and link it to my VB6 application. i designed a VB application to hold bio-data that will be updated from time to time but am finding it difficult to create the access back-end for it. please any urgent help will be most welcomed

This is less information about what makes you hard to code it?
How far you doing this? Post your code and we'll trying to help it.
You can use ADODB to linked vb6 with access.

try learning the basic of adodb;
Learn how to connect a database using ADODB.Connection
Learn CRUD (Create, Read, Update, Delete) using ADODB.Recordset

What have you done on your project so far?..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.