NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

PROP_RESULT already exists for new database

Hi,

 

If I select the 'Generic Recordset (NI)' along with a new empty Access database and in the Schemas tab press the Validate... button, the Schema Validation rightly finds these differences. But when I 'Generate SQL' to 'Add Missing Items' the following warning comes up three times.

 

"There is more than one statement logging to the same table..." etc.

 

 

CropperCapture[51].Png

 

 

Then in the Execute SQL View when I 'Execute SQL Commands' there are many errors with 'Command failed' and something like Table 'PROP_RESULT already exists'.

 

The only reason I am looking into this is because I cannot add a MODEL_STRING to the database without an error at the end of the database results processing.

 

CropperCapture[54].Png

 

Is this the expected behavior?

 

Thanks,

 

Ronnie

TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
0 Kudos
Message 1 of 6
(4,263 Views)

For the benefit of anyone else that encounters this problem:

 

Looking at the SQL produced, I see that there is a command to CREATE TABLE PROP_RESULT three times.

The first CREATE will be the one that is successful, while the others fail.

 

My particular error at the end of a test run is being caused because DATA is defined as a Double in the first table,

yet as a VarChar[255] in the others. DATA needs to be VarChar[255]. but unfortunately the first table definition

is the one that persists.

 

By manually changing the type of DATA from Double to VarChar[255] in Access, the problem is fixed.

 

So, the original SQL must be faulty. Below are the three definitions for the PROP_RESULT table. I am going to keep

the middle table definition and delete the others.

 

Notice also that PATH in the first table definition is LongText, but in the others VarChar[255]. Probably it should be LongText.

 

Perhaps this may be helpful,

 

Ronnie

 

 

CropperCapture[57].Png

TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
0 Kudos
Message 2 of 6
(4,248 Views)

Ronnie -

I am not sure if you know this but the recommended SQL statements for the default schemas are located in the <TestStand>\Components\Models\TestStandModels\Database directory and the one for the Generic Recordset for Access is Access Create Generic Recordset Result Tables.sql. You might want to review the SQL that you decided to use and compare it to this file. Also there is a default Access database located at C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2\Components\Models\TestStand Results.mdb that you might want to consider using as a starting point.

 

The purpose of the Validate button is to help consider what is missing in the current database. We will have to review its output because what you received as output does not appear correct. Thanks for letting us know.

Scott Richardson
https://testeract.com
0 Kudos
Message 3 of 6
(4,238 Views)

Scott,

 

Thanks for the input. I confirmed that if I go straight for the Data Viewer and load the sql file that you mentioned, it looks good and creates the tables correctly without error. Going through the Validate instead gives a different SQL output than the actual file. This SQL doesn't work correctly.

 

Could I ask one more question? Could you please tell me how the schema listed here (e.g. My copy of Generic Recordset), maps to a specific SQL file in the Components\Models\TestStandModels\Database directory? Where is the association made? I see there is an export and import for ini files. Is that it?

 

Thanks,

 

Ronnie

 

CropperCapture[59].Png

TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
0 Kudos
Message 4 of 6
(4,225 Views)

Hi Ronnie,

 

There is no relationship with the schema configuration specified in the Database Options tool to the <TestStand>\Components\Models\TestStandModels\Database directory. The tool records all schema configurations under <TestStand>\Cfg\TestStandDatabaseOptions.ini. The tool dynamically creates all SQL scripts each time using the information recorded in TestStandDatabaseOptions.ini. The Database directory primarily serves as a backup for the default schemas (specified under TestStandDatabaseOptionsDef.ini) and SQL scripts.

 

Hope that clarifies some things.

Message Edited by Nestor_G on 09-26-2009 10:46 PM
Nestor
0 Kudos
Message 5 of 6
(4,166 Views)

Thanks for the clarification Nestor.

Ronnie

TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
0 Kudos
Message 6 of 6
(4,145 Views)