NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Database error in TS4.1

Solved!
Go to solution

Hi,

 

I was using my database.ini of my TS3.5 (on another PC) in my other PC with TS4.1.  I did so in order to use the same schema.

 

This is the error message I get:

 

An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'
An error occurred executing a statement.
Schema: ATE_database_multiplePC
Statement: UUT_RESULT.
Description: Field 'UUT_RESULT.UUT_ERROR_MESSAGE'

 

Looking into the schema fields, I found that the expression of UUT_RESULT.UUT_ERROR_MESSAGE is  "Logging.UUTResult.Error.Msg".

 

I put a break before the step 'Log Result to Database' is executed and looked at the parameters.

 

I didn't see the parameter "Logging.UUTResult.Error.Msg"  and that's why it failed.  There is , however, a similar parameter called  "Logging.MainSequenceResult.Error.Msg".

 

My sequential model is also from my TS3.5 system.  I use it instead of my TS4.1 sequential model since I have customized it a little.

 

Any explanation to this?  Can I use the parameter "Logging.MainSequenceResult.Error.Msg" in my schema instead of the old one "Logging.UUTResult.Error.Msg"  ?

 

Thanks

Rafi

0 Kudos
Message 1 of 13
(4,464 Views)

Hi Rafi,

 

When you look at the expression browser, do you see Logging.MainSequenceResult in there? Logging.UUTResult is not the "old" one because I am using TestStand 4.1.1 and it still uses Logging.UUTResult whereas I cannot find Logging.MainSequenceResult within my expression browser. Thanks for the information!

0 Kudos
Message 2 of 13
(4,435 Views)

Hi Corbin and thanks,

 

The answer is YES. 

 

I put a breakpoint on 'log Result to Database' and when execution stops there I look at the variable context.  I can only see  'Loggin.MainSequenceResults'.

If I look at the parameters of this sequence ( Logging UUT Results to Database) I can see MainSequenceResults.  (seems connected, isn't it?).  Also, the first step of the sequence is 'Create Logging Context' which probably (I don't really understand those activeX stes...) creats the logging variable that we see which includes the 'Logging.MainSequenceResutl'

 

As I said, I'm using a TS3.5 Sequential model.  Can you see any differences with the TS4.1 Sequential model that might be contributing to this error?

 

Thanks again

Rafi

 

 

0 Kudos
Message 3 of 13
(4,419 Views)
Logging.UUTResult.Error.Msg is located within the TestStand 4.1 sequential model (more specifically, the Database.seq callback). When you moved your sequential model from 3.5 to 4.1, did you also copy over Database.seq? Database.seq for TestStand 3.5 uses ActiveX steps while the sequence for TestStand 4.1 uses expressions. If you look at the variables under the Edit Database Options sequence within Database.seq for TestStand 4.1, you should find Logging.UUTResult.Error.Msg.
0 Kudos
Message 4 of 13
(4,392 Views)
To add to my previous post, it is always best practice for upgrading to copy all the process model files (pretty much everything in <TestStand>\Components\NI\Models) because the 4.1 counterparts might not have the same behavior.
0 Kudos
Message 5 of 13
(4,382 Views)

Rafi -

You should not attempt to reference the 'Logging.MainSequenceResults' property. It exists because the Log To Database sequence constructs the Logging property on the context by creating an alias to the Parameters property. The Parameters property has a MainSequenceResults subproperty, but this implementation is not documented and could change in the future. The Parameters.MainSequenceResult property is passed to the server and the server should be copying the result to a Logging.UUTResult property. You can gleen some information about the state of logging at the time of the error by looking at the Logging property on the context AFTER the step 'Log Result to Database' is executed because the server alters the context while processing the UUT result and the step results.

 

The recommendation to bring the Database.seq file from 3.5 to 4.1 will only work if you also pulled the 3.5 logging server as well, which can be difficult to deploy, so I would recommend sticking with the new server and the new Database.seq file.

 

Would you be willing to post your Database.ini file from 3.5? This might help us determine what is unique about your schema.

Scott Richardson
0 Kudos
Message 6 of 13
(4,360 Views)

I just "upgraded" to TestStand 4.1.1 adn now cannot get it to run for all the database errors, all of which seem to be variations on the following:

 

An error occurred calling 'LogOneResult' in 'ITSDBLog' of 'zNI TestStand Database Logging'
An error occurred executing a statement.
Statement: UUT_RESULT.
Description: Data type mismatch in criteria expression.
Number: -2147217913

 

I have followed the various related threads and copied the default 4.1.1 TestStand Results.mdb to my database folder, as well as copied the Database.seq to the 4.11 folder.  All to no avail.  HELP

Jim

0 Kudos
Message 7 of 13
(4,167 Views)

Hi Jim

 

I can't help you to solve your problem but I can tell you what I did.  I gave up fixing the problem and just started from the beginning.  It means taking the database available with TS4.1 and applied all the modifications I did on the database of TS3.5.  It wasn't much,  and therefore, not too much work was involved.

 

If your case is more complicated, then, hopefully, somebody can help you with the upgrade.

 

Good luck

 

Regards

Rafi

0 Kudos
Message 8 of 13
(4,150 Views)

Jim,

 

I also had to struggle with a similar issue, when I migrated to Testand 4.1.1 from 3.5. I'm not sure if this will fix your problem, but have a look anyway. The answer to my problem was to apply a patch, described as "NI TestStand Development System 4.1 - Windows 2000/Vista x64/Vista x86/XP - Patch 123594: Fix for Database Filter Expression". Here is a link: http://joule.ni.com/nidu/cds/view/p/id/1127/lang/en

 

Hope this helps

 

Regards

0 Kudos
Message 9 of 13
(4,147 Views)

Hi Jim,

 

What version of TestStand did you upgrade from? It would also be helpful to know what process model you are using, what database options you have configured, and at what point in your execution do the errors occur. Any of this information would be quite helpful.

0 Kudos
Message 10 of 13
(4,110 Views)