New List using MS Access

<< Click to Display Table of Contents >>

Navigation:  PlantExpressTools > How to use > Update Selection Lists > Setup >

New List using MS Access

Previous pageReturn to chapter overviewNext page

In this example we use a MS Access database with the table "Stoffstromliste". This is actually from a German customer.

Selection Lists 41

But there is also a query "Access query Test" which contains only two rows from the table.

Selection Lists 42

We open the main dialog again.

Selection Lists 01

We see the configuration of the previous chapters. Make sure they are all disabled before continuing.

Selection Lists 43

This time we must use "OleDb data source (UDL)" for the data source.

MS Access and SQL Server database will be accessed through so called OLE DB Provider. The link to such a data source will be established through a UDL file. Which is a Windows file.

If you already created a UDL file you can select this through the "Browse" button. but we will create a new one to show how you do it from scratch.

Selection Lists 44

Click on "New".

Selection Lists 45

Now you select a folder and type in a file name. As with the Excel, CSV and SQLite examples, you probably want to put the file somewhere under your project folder, if the database is project specific.

Selection Lists 46

Now the "Data Link Properties" dialog opens which is a standard dialog of Windows.

Selection Lists 47

Click on the "Provider" tab and you see all OLE DB Providers installed on your machine. Several providers are installed with Windows.

The provider for Access are not available by default. Here you can find the latest one.

Selection Lists 48

The we switch back to the "Connection" tab and select the path and file name for our MS Access database.

Selection Lists 49

Unfortunately, there is no browse button so you have to copy the path and file name behind each other or type it in.

To make sure everything is ok, click on the "Test Connection" button. This makes sure that all settings are complete and valid.

Selection Lists 50

You get this dialog when everything is ok.

Selection Lists 51

After closing the "Data Link Properties" dialog, you see the path and file name in the configuration dialog.

Selection Lists 52

You can change the path again to make it relative.

Selection Lists 53

Now we want to make the path in the UDL file relative too. For that, we click on "Edit".

Selection Lists 54

Now we change the path the same way to use the [PP] variable.

Selection Lists 55

However, since this is a Windows dialog, Windows doesn't understand what [PP] means. Therefore, when you click on "Test Connection" you will get an error message. So before you change the path, make sure that you get a positive result when clicking on "Test Connection".

Selection Lists 56

Tipp: The use of the [PP] variable is not needed anymore. The Selection List function will adapt the path in the UDL file automatically to a relative path. For exampl, if the UDL files and MS Access database are in the same folder, Windows doesn't require a path at all.

Click on OK in the Data Link Properties dialog. and select "Tables" and then the "Stoffstromliste". You the select Stoff and Medium.

Selection Lists 57

Now lets have a look at Views. We have just the "Access Query Test" view. And now we select Stoff and Kurztext.

Selection Lists 58

We select the same Category settings as before.

Selection Lists 59

We see the new line.

Selection Lists 60

We update the Selection List.

Selection Lists 16

We get the result.

Selection Lists 17

When we check we see the content from our MS Access database.

Selection Lists 61

Next Chapter: New List using SQL Server