How Can We Help?
< All Topics
Print

How to Connect to Microsoft Access


Purpose of this article

This article aims to show you how to configure Microsoft Access and integrate with ADISRA SmartView. Below, an example table will be created.

Creating a table in Microsoft Access

Microsoft Access is a database management software (DBMS) provided in the Microsoft Office suite. It is commonly used in smaller applications for simple data storage.

  1. Open Microsoft Access and create a blank database as shown in the image below.

Microsoft Access will automatically create the first table with a column called “ID” as shown in the image below.

  1. Right-click on the “ID” column and then click on the “insert field” option.
  1. Right-click on the new “Field1” column and then click on the “Rename Field” option. Rename the column to “Names”.
  1. Select the new column “Names” and in the top menu, click on the “Table Fields” tab and set the “Data Type” as Short Text, and the “Field Size” with the value 50 as shown in the image below.
  1. Click on the first field of the “Names” column and enter the name “George”.

Note: The “ID” column will be automatically incremented with increasing numbers as it is an Identifier column.

  1. In the “Names” column add two more names to the fields.
  1. Now, on the top menu, click on the “Save” button. Then Microsoft Access will ask for a new name for “Table1”.   Save the table as “Person”.
  1. After the action in Step 7,  the expected results are below. 
  1. In the screenshot below, it shows the path where the database was saved. The file has the extension “.accdb”.

Configuring ADISRA SmartView

  1. Open ADISRA SmartView and create a new application. On the top menu, click on the “Settings” tab and then click on the “Database Connections” option.
  1. Click the “+” button to add a new connectivity.
  1. Select “Microsoft Access Database File” as your data source, then click OK.
  1. In the new open window, click on “Browse…” and search for the database generated by Microsoft Access.  In our example above, it was Database1.

Note: It is necessary to close Microsoft Access to be able to browse in the “Database file name:” for “database1.accdb”.

  1. Test the communication by clicking the “Test Connection” button. Click the OK button in the test window and after clicking OK to close the configuration window.
  1. Keep the database name as “AccessFile001” and click OK.

Querying the Database called “Database1.accdb”

  1. Create a new Graphic and insert a “Datagrid” object.
  1. In the property list of the DataGrid object, in the “DataGrid Config” property, select the option “Table”, “AccessFile001” and “Person”.

Note: When the table is selected, all columns created in Microsoft Access will appear.

  1. Below the expected result.
  1. Save the application and set “Graphic1” as the initial Graphic for the Runtime and then start the Runtime. Below is the expected result.

Leave a Reply

Your email address will not be published. Required fields are marked *

twenty + two =

Table of Contents