LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read a dbase-file (dbf) into an array?

Hello!
I want to read measurement data from a dbf-file and transform them into an array, like I can do it with a csv-file with the vi "read lines from file".
An example file is in the attachment. I use Labview 7.0.
Who can help?
Than you
Thomas
0 Kudos
Message 1 of 3
(4,464 Views)

Hi

I have a way of doing it through MS Access.

I have created a MS Access Database and then created a linked table to your file inside the mdb.

You then have to create an ODBC link to the access database in this case called link_to_mdb

The code uses LabSQL from http://www.jeffreytravis.com/lost/download/ which is free.

The attached zip file contains an example mdb, your file, bits of LabSQL and the main vi.

This would mean that your results file name would need to be static. This is because the .dbf file is reference by the link in the mdb file.

Alternatively Excel can handle dbf files so you could read the data from the dbf using ActiveX then read it back into you labview table.

Hopefully this will help you on your way.

David

Message 2 of 3
(4,458 Views)
Database files typically can't be simply parsed to arrays like CSV files. You will always have to use the (ODBC) driver for the specific database and SQL commands to get data from database files.
Besides the option David has suggested there is also the LabVIEW Enterprise Connectivity Toolset available from National Instruments.

I hope this helps,

Jochen Klier
National Instruments Germany
0 Kudos
Message 3 of 3
(4,445 Views)