Home > LabVIEW > A Note about Using Database Connectivity Toolset in LabVIEW

A Note about Using Database Connectivity Toolset in LabVIEW

March 8th, 2009

The Database Connectivity Toolset is a great add-on toolkit for LabVIEW, it makes the database operation within LabVIEW so easy that you can operate database even without sound knowledge of database.

I used this toolkit in one of my projects to record the test results of UUTs into MS Access database. I created a save results to database subVI with this toolkit. The subVI looks like this:

Origin LabVIEW subVI 

It is simple. When the table does not exist, this subVI creates the table and inserts data, when the table exist, the subVI inserts data only. When I call this subVI for the first time, everything is fine. But when I call it again with the same table name and different data especially when the string data in the same column is much longer than the last time, there will be an error. After checked the Access database, I found out that the DB Tools Insert Data VI created the table and formatted every column’s size exactly the same as the initial data set. So, inserting data that longer than the initial will make an error.

The solution is first check if the table exists, then use the DB Tools Create Table VI to create table if table does not exist as in the following diagram:

Solution To DB Save

LabVIEW , ,

  1. No comments yet.
  1. No trackbacks yet.