Quantcast
Channel: NI TestStand topics
Viewing all articles
Browse latest Browse all 6524

Get database connection string from datalink COM object

$
0
0

Hi All,

 

We are using TestStand 4.1.1 with the batch model and the sequential model. The testresults are logged into *.mdb Access files. DUTs are identified with their serial number, each serial number is part of an order which has an ordernumber and holds multiple serial numbers. The filenames of the mdb databases contains the ordernumber. One batch test run can contain serial numbers of different order numbers (not likely but it happens) which need to be logged in the correct according order database files. To accomplish this, the datalink to the mdb database is reset after logging the testresults of each testsocket using the statement:

 

RunState.Execution.TSDatabaseLoggingDatalink_T3=Nothing

 

We have some products that use 16 or more testsockets, logging the testresults of this products takes a long time because for each test and testsocket the database connection is closed and reopened.

 

I want to be able to check which database file is opened at the time and compare it with the ordernumber of the test socket serial number that has to be logged next, if the order numbers are equal, closing the database link is not necessary. Since resetting the datalink object closes the database connection, I thought I could retreive the connection string via this object. Is there a way to get the actual testresult database connection string from this RunState.Execution.TSDatabaseLoggingDatalink_T3 object?

 

I found that the object  RunState.Execution.TSDatabaseLoggingDatalink_T3 is referenced as an IInstrSession COM object. This interface is defined in the file "C:\Program Files (x86)\National Instruments\Shared\Session Manager\NISessionServer.dll", which holds some private classes implementing the IInstrSession interface. Is it possible to track down the actual class of the object and get the connection string in this way?

 

Thanks in advance,

 


Viewing all articles
Browse latest Browse all 6524

Trending Articles