NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Database stops recording step results

Go to solution

I have an issue with all step results after a particular step not being recorded into the database. At first this was a property loader. My workaround was to just skip the property loader. Now the step_result table shows more tests for each UUT, but is now stopping much later on a particular passfail step. The execution does run to completion and the report show all executed steps. Just the database is missing steps.


Teststand 2019

SQL Server 2017

Schema: Generic Recordset (NI)



0 Kudos
Message 1 of 5

I've narrowed it down to steps that log a waveform. I can also reproduce it on new versions of TS/LV. Attached is a minimal sequence that has the issue. You need to create a SQL Server database, connect to it in the Database plugin with 'Generic Recordset (NI)' and all the default options.

The database plugin throws an error.

Screenshot 2021-12-10 164537.png


I have also tried it with 'SQL Server Stored Proc (NI)' and it the error is:

An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'
An error occurred executing a statement.
Schema: SQL Server Stored Proc (NI)
Description: The INSERT statement conflicted with the FOREIGN KEY constraint "PROP_ANALOGWAVEFORM_PROP_RESULT_FK". The conflict occurred in database "teststand2", table "dbo.PROP_RESULT", column 'ID'.
Number: -2147217873
NativeError: 547
SQLState: 23000
Reported by: Microsoft OLE DB Provider for SQL ServerDescription: The statement has been terminated.
Number: -2147217873
NativeError: 3621
SQLState: 01000
Reported by: Microsoft OLE DB Provider for SQL Server

Source: TSDBLog

0 Kudos
Message 2 of 5

Has anyone logged a waveform into a database before? Did you make any modifications to the schema? What database server did you use?

0 Kudos
Message 3 of 5
Accepted by topic author Jessica.Badowski

I remade the database with the remaining schema 'Generic Insert (NI)' and it started logging waveforms.


I do not know why neither 'Generic Recordset (NI)' nor 'SQL Server Stored Proc (NI)' worked with waveforms. Their comments specifically mention supporting Microsoft SQL Server and that they "Logs LabVIEWDigitalWaveform to PROP_DIGITALWAVEFORM."


0 Kudos
Message 4 of 5

Sorry I didn't login earlier to help with this.


These schemas are pretty old ( I was using them in 2008, and I don' think they have changed).  I suspect that the Recordset inserts for MSSQL aren't supported anymore, or maybe changed over the years.  they probably still work for Access, which is the only time I have seen the Generic Recordset used.


I have never looked at the stored procedures, so I can't tell you about that one.  Glad you got it working.

0 Kudos
Message 5 of 5