NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to two Databases

Hi,

 

I am using TS 4.1 and I am having difficulty with the Database section of the code. 

 

I have two part numbers that I can test. For example, ABC and XYZ and each of them have their own database to store their results.

 

In the Database Options I have edited the Connection String so it determines which product is under test and sets the string according to that so it writes to the correct database.

I have verified that this is working correctly as I have a prompt coming up to tell me what the connection string is.

 

If I shutdown Teststand Completely and restart it and begin testing:

- I choose product ABC and the connection string tells me it is going to ABC database.

- I run the unit and the results get sent to ABC database.

 

If I then Exit the code but I do not shut down TestStand, re-run the test program. 

- In process setup I again choose the part number and choose XYZ

- I get a prompt telling me the connection string going to XYZ database.

- I run the unit and the results get sent to ABC database.......this is the issue.

 

If I shutdown Teststand Completely and restart it and begin testing:

- I choose product XYZ and the connection string tells me it is going to XYZ database.

- I run the unit and the results get sent to XYZ database.

 

I have put in a stop in "Database.seq" and before it runs the "Log to Database" step, I have verified the connection string here and it is as it should be for the part number under test but it always write to the database that was setup first, i.e. in the example above ABC database.

 

If I reverse the testing, the ABC gets written to the XYZ so I don't have the database hardcoded anywhere.

 

If anyone has any suggestions, please post them.

 

Thanks.

0 Kudos
Message 1 of 1
(3,326 Views)