NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using two databases

I have two sequences. I would like each sequence to use it's own database. So, I copied directory
...\FunctionalExec\Sequences
to directory
...\FunctionalExec\Sequences2
 
But the sequence I am running in Sequences2 still writes to database Sequences\Results.mdb, not to Sequences2\Results.mdb.
 
Is there a way to collect sequence information for two sequences in two different databases?
 
(I am using TestStand 3.0)
 
Thanks,
 
Alan
 
0 Kudos
Message 1 of 5
(3,489 Views)

Hi,

Use the DatabaseOptions callback sequence in your two sequence files to define the different database connection requirements. This overrides the Configure Database Options.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 5
(3,478 Views)
Hey Alan,

I just wanted to add to what Ray said.  The specific parameter you want to modify in the DatabaseOptions callback is the Parameters.DatabaseOptions.ConnectionString.  Changing this string will store a new database location for this one sequence file.  I hope this helps!
Best Regards,
Software Engineer
Jett R
0 Kudos
Message 3 of 5
(3,460 Views)

Thanks Ray and Jett. I edited Edit / Sequence File Callbacks... / DatabaseOptions. This created a new Sequence: DatabaseOptions. I added a step to this new Sequence: Open Database:

Parameters.DatabaseOptions.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\\TS\\FunctionalExec\\Sequences-FF\\Results.mdb;"

But when the Open Database sequence is run, it generates the following error:

Location: Step 'Log Results to Database' of sequence 'Log To Database' in 'Database.seq'

Error Code: -17322; Syntax error in expression.

Details: An error occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
An error occurred initializing a connection to a data link.
Unexpected token: .4
Source: TSDBLog

I also tried an Open Database with the string "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\\TS\\FunctionalExec\\Sequences-FF\\Results.mdb;" (i.e. without Parameters.DatabaseOptions.ConnectionString = ). I didn't get the error above, but the data was appended to my Sequences\Results.mdb database instead of the Sequences-FF\\Results.mdb database.

Any help would be appreciated.

Thanks,

Alan

 

 

0 Kudos
Message 4 of 5
(3,434 Views)
Solution found:
 
Edit / Sequence File Callbacks... / DatabaseOptions. This created a new Sequence: DatabaseOptions. I added a step to this new Sequence: Open Database:

Parameters.DatabaseOptions.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\\TS\\FunctionalExec\\Sequences-FF\\Results.mdb;"

Now, change the type of the new sequence from Open Database, to a function.

Alan

 

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