NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can TestStand create a new database

Solved!
Go to solution

I have what I thought was an easy questions but I can't find the solution.

 

When using the data logging we choose which file it is writing to (I am using Access). I was wondering if there is a way to have TestStand automatically create and save a new file based on the serial number entered during testing.

So instead of having 1 Access file with all of the serial numbers inside of it (i.e TestSolutions.mdb).

 

We would have several Access files all named by the serial numbers input during testing. (i.e. 123.mdb, 124.mdb, 125.mdb, and so on if the serial numbers entered during testing was 123,124,125).

 

Also this should append an already created Access file if the serial number is repeated.

 

Thanks for all the help.

0 Kudos
Message 1 of 5
(3,630 Views)
Solution
Accepted by topic author JDASM

In my experience, the database must be created with the appropriate tables and relationships before testing can begin.

 

But in your case, you could do the following:

 

1.) Create a default 'template.mdb' that is blank and contains all the necessary tables.

2.) Scan your serial number and COPY your 'template.mdb' to <SN.mdb>.  I could easily do this in LabVIEW.

 

You can do the renaming in the DatabaseOptions callback.  It is important to set the ConnectionString.

 

For example, I use the following ConnectionString....

 

Parameters.DatabaseOptions.ConnectionString="\"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\<SN.mdb>;Persist Security Info=False\""

 

I never thought of doing creating separate databases for each serial number, is there any reason why you would need to do that? 


PH

0 Kudos
Message 2 of 5
(3,611 Views)

Good idea,

 

I will go and try this out.

 

I want them stored as serial numbers that way I have a history of how each serial number is acting (passing/failing) rather than one big huge file.

0 Kudos
Message 3 of 5
(3,608 Views)
The purpose of a database is that you don't gave to think in terms of files. You just do a query on your serial number.
=====================
LabVIEW 2012


0 Kudos
Message 4 of 5
(3,606 Views)
Err.. HAVE to think not GAVE to think. Dang swype keyboard!
=====================
LabVIEW 2012


0 Kudos
Message 5 of 5
(3,603 Views)