A1VBCode Forums

Linking VB6 to MSAccess database?


http://www.a1vbcode.com/vbforums/Topic27118.aspx

By BuzzL30 - 2/24/2009

My question or topic as it may be is what elements are need to a VB6 project to work correctly with MSAccess db

I know I need at least 1 table, and Queries, and possibly Modules but do I need to create a report?

I know I need to add the fields that want to have in the VB6 project to the table or tables as it may be, but the rest I am not sure of I do know it will depend on what I want in my VB6 this can be answered by reading my other topic I have in here there is a zip file uploaded for any to try and solve this question.

By vb5prgrmr - 8/25/2009

You can access a *.MDB file with DAO, RDO, ADO, DAODC(Data1), ADODC(Data1), RDODC(ODBCData1), or DAO ODBC Direct. However, I suggest you use ADO and the data form wizard (search for it under add-ins>add-in manager). Use the wizard and choose the code option.

 

As for needing queries, yes you will need them but not contained by the access file. To access the data you will pass your sql string to the jet libraries via one of the data access methods mentioned above.

 

As for a report, that depends upon your requirements. VB comes with CR4.5 (Crystal Reports) but you will have to find it on the disk to install it.

 

 

 

Good Luck