NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing user configuration details from database

Hi
 
I have seen the that the user configuration details are sored in .ini file \Program Files\National Instruments\TestStand 3.1\Cfg\Users.ini
 
is it possible to store the user details in a database table and validating the same from database?
 
and also refer me a link/doc where i can get the details of how to store the reusults in my own database, adding customized preperties ( like adding comments about a test, adding root cause analysis for a test failed) etc., Give me more links/docs  whatever  is being related to database handling in teststand. i have google this site , i get to know about creating mysql etc.,
 
 
0 Kudos
Message 1 of 3
(3,454 Views)
Srini,

The Users.ini file is automatically loaded by TestStand when it is initialized.  However, it is not necessary that you use the Users.ini file to hold your user information.  Instead you can load the information from your database and programmatically create a UserList.  You can create a UserList and populate the list with Users with the Engine functions NewUser and UserFile functions.  For an example of the use of these calls please take a look at the examples in the <TestStand>\Examples\CreateDeleteUsers directory.  You can modify or replace the FrontEndCallbacks.seq found in the <TestStand>\Components\NI\Callbacks\FrontEnd directory.  The FrontEndCallbacks.seq is normally called when the Engine is initalized (unless the AutomaticLogin option is set).  If you look at the sequence you will notice there is a Login and Logout call made to a C DLL.  These handle logging the user in and out.  You can insert your code to load the user information from the Database before these calls are made.

For information on database logging, I recommend looking at the TestStand Reference Manual.  Chapter 6 gives a detailed explanation of the Database Logging architecture that TestStand utilizes.  You can add more information to the database by modifying the schema that the Database Logger utilizes and modifying the ResultList to contain the additional data.  The TestStand I: Introduction course manual contains two great chapters on database logging as well.  Finally, take a look at the Database directory in the <TestStand>\Examples directory.  You may be able to base your system from some of the code that exists there.

If you have specific questions, please let me know.

Thanks,

Tyler
0 Kudos
Message 2 of 3
(3,422 Views)

Thanks tyler,

 

I saw the example in <TestStand>\Examples\CreateDeleteUsers

but it Calls ActiveX/Com dll functions like

 

UserExists?
Create New User
Set Login Name
Set Password
Get Users File
Get Users List
Insert New User

 

So as per your suggestion we have to edit these functions in such a way that it will create/get the user details to/from database correct??

 

Where can I find the source code for these COM dlls??

Can I edit these functions??

 

And the Login and Logout dll also uses the  engine functions like TS_EngineSetCurrentUser,TS_EngineGetUser etc. so for my purpose I have to edit these functions in such a way that it will get the user details from database right?? Is it possible ?? 

0 Kudos
Message 3 of 3
(3,405 Views)