NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL DB Error: -2147217900

Solved!
Go to solution

Hello,

I need help with the configuration for an SQL database. 

When I check the connection in Configure → 'Result Processing' → Database → Options --> Build/DataLink Properties --> Test Connection. Its succeded.

But when I run my sequence, I get the following error: -2147217900. Could not find stored procedure "InsertUUTResult". 

Please attached, you can see photos of the error.

 

Could you please help me with this?

Thanks so much in advance

 
 
Download All
0 Kudos
Message 1 of 8
(635 Views)
Solution
Accepted by Elfernro

Hi,

 

Did you add the schema to the database?

 

image.png

 

You need to select a Schema, then validate the schema, this will open a new window and prompt to you to add the tables and columns to your database.

image.png

 

You need to click on Generate SQL and then run the SQL.

 

If you dont do this the database conection will be ok but you dont have the Tables, so will return an error when TestStand is trying to send the results.

 

Let me know if this help you.


Links

 

-Creating a TestStand Database Schema from Scratch - NI

-Solucionado: Result Processing Database Schema - NI Community

Message 2 of 8
(608 Views)

Perfect, it’s exactly what I needed. The first link you attached helped me a lot. It’s working now!!

Thanks so much!!!

0 Kudos
Message 3 of 8
(582 Views)

Hallo,

Sorry, but it gave me an error again. In Schema, I have selected SQL Server Stored Proc (NI) (I dont have the schema that you indicated). I have validated it as you indicated and clicked 'Build SQL File'. When running the Database View, I clicked the green Run button.

 

I have checked my test, and it seems that it works when I have Pass/Fail tests. I have verified that I am saving the data correctly in the database, but when I have a numeric test, I get this error (Please see attached picture)

 

Could you please help me with that?

 

0 Kudos
Message 4 of 8
(563 Views)

sorry attached the pictures

Download All
0 Kudos
Message 5 of 8
(560 Views)

Sorry to bother you again. I solved it by using 'Schema' = Generic Insert (NI), but it’s not clear to me when to use each one. I thought that since I’m using SQL Server, I should use 'SQL Server Stored Proc'.

 

Best regards, and thank you very much for your time!

0 Kudos
Message 6 of 8
(557 Views)

Thats good news, your welcome.

 

 

About the schemas, You need to use the one that adapts better to your machine context, just for your information and future reference, for me the diference between the schemas are the following

 

  • Generic Recordset (NI) This use select (in the SQL Query) and use numeric ID, if you just want to save the TestStand results in a local database or is just this machine saving result to the server database this is enough
  • Generic Insert (NI) This use INSERT and use GUID (Unique Identifier), this is more usefull when You dont want to have problems with duplicated IDs, If you see that you need some scalability or multiple machines saving on a server database this could be the more suitable.
  • Stored procedure - this one use the stored procedures that need to be on the database also, for this you need the Columns,Tables and SP, this also use GUID, an Stored procedure is like a SubVI on database, You only run a code with parameters, like calling a method. Probably this is the best method for a large scale and big database, since the Stored procedure runs on the server side and not in your local machine.

 

 

Message 7 of 8
(540 Views)

Thank you so much again for your explanation and your time. You've helped me a lot!

0 Kudos
Message 8 of 8
(526 Views)