Question:

Access database in vb project.

by Guest11168948  |  2 years, 8 month(s) ago

0 LIKES UnLike

Access database in vb project.

 Tags: Access, database, project, VB

   Report

2 ANSWERS

  1. jimbackland

    To work with ms access databases try http://www.access.fixtoolbox.com  
    It can open problem access databases, restore corrupted .mdb files.

  2. Arslan Masaud
    hello The easiest way to access a Microsoft Access Database using Visual basic is by using a data control on the tool box. You draw the data control on the form and specify the DatabaseName and Recordsource (Table/query) properties. after that you can create other ocntrols (e.g. textbox, flexgrid, etc) and link them to the data control using Datasource property. Alternatively, you can use Microsoft Data Access Objects (DAO) in code by creating a reference to it i.e. clicking Project --> References -->Microsoft DAO 3.6. When you do that, you can write the following code to open an Access database: Dim db as DAO.Database Dim rs as DAO.Recordset Set db=OpenDatabase("test.mdb") Set rs=db.OpenRecordset("table1") Debug.print (rs.fields("Field1").value) etc. Microsoft ActiveX Data objects (ADO) works in a similar way to DAO hope it helps

Question Stats

Latest activity: 5 days, 19 hour(s) ago.
This question has been viewed 146 times and has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions