MS Viusal Basic 6.0 with MS Access

  • Thread starter Thread starter Elric
  • Start date Start date
E

Elric

Guest
Hi everyone. I need your help about access with vb.

My question is:
I need a database named "db1.mdb". This database should have 2 tables named "table1", "table2". It's O.K. for now. Here it comes. I can not make insertions into these tables from vb. Need help. Thanks.
 
Hi Elric

What have you created so far?
Do you have the access database and the tables created in access?
Do you have the access database and the tables displayed in a form in VB?

The best way for VB6 to talk to access is via ADO (Activex Data Objects)

Give me as much info as you can and i'll offer as much help as I can. I have already created a VB6 app which talks to access, allbeit read only.
 
connordrew said:
The best way for VB6 to talk to access is via ADO (Activex Data Objects)

connordrew ADO is not a litle complicated?
Elric If You're New in this like me, i suggest the use of recordset to access the database, it can make the code a litle simplier i guess...
 
Last edited:
For the simplest (for beginners) read/write access to Access in VB6, just place a Data control (should be on the main control list when you start up VB6) on the form. Then, you can set it's Database property to the mdb file you want to connect to. Make sure you've installed the service packs and change the data control's DEFAULT TYPE to Jet 4.0, if you are using an A2K mdb file. Otherwise you have to use an A97 mdb file.

You can then set the recordsource of the data control via code, and you can control whether it is read only or writeable. You will tie your text boxes, and other applicable controls, to the data control in the datasource and data member properties.

You can also use the ADO data control if you prefer. It is available in the components list (Microsoft ADO Data Control 6.0).
 
Image sorting in Access database

Hi, i have designed an Access 2003 database which searches a particular folder for latest .jpeg files and then saves the images into the table.

The problem is that i get 2 types of images (both Jpeg) but with different strings like:
- 001254frm.jpg
- 001256lic.jpg

I need to sort these images into two different columns so that i can use VB to display them appropriately.

Does anyone know a technique by which i can read the name of image file and based on the characters recognized, it sorts the images into two columns. I recon an SQL query can be used but i dont know how....

HELP!
 

Users who are viewing this thread

Back
Top Bottom