NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand database logging problem: only the first character is put in the table.

I am using TestStand 2.0.1 and Microsoft SQL server database. There is a weird problem when I use database logging. At first, all the database logging ran good.
 
Then one day after I moved the test equipment to production line, TestStand only logs the first character of each string field in the tables! There is no error message.
 
I setup another SQL server running locally on the same machine as the TestStand is and move the database to the local server, database logging has no problem. Schemas in TestStand Dabasebase Options are the same.
 
I tried to run TestStand from another computer on the network. There was no problem before, too.  But now, TestStand always shows a Run-time error message like this:
 
Details:
An exception occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
An error occurred executing a statement.
Schema: New.
Statement: STEP_RESULT.
Connection failureMultiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Source: TSDBLog
 
Error Code:
-2147467259; User-defined error code.
 
Location:
Step 'Log Results to Database' of sequence 'Log To Database' in 'Database.seq'
 
I have checked that the connection is good and also the table UUT_RESULT has been logged correctly.
 
Anyone can help?
 
Thanks.
0 Kudos
Message 1 of 25
(5,133 Views)

Jaso,

Although I am not sure exactly what is causing the error, there a few things that I think we could start looking at to find the root cause.  First, it seems that you are using a custom Schema to log your results called "New". 

What changes have you performed on this Schema and did you base it on pre-existing Schema?  Although most databases support a default set of SQL commands there are little differences that might be causing this error.

Have you tried using one of the existing Schemas to log your results?  This would be a way of trying to find out exactly what is going wrong.

Also, have you been running the same Sequence when the error started occurring or was this a different Sequence?  If it was a different Sequence we would want to take a look at what is different about this Sequence to the one that worked to find the cause of the issue.

Regards,

Santiago D

0 Kudos
Message 2 of 25
(5,102 Views)

Thank you very much, Santiago.

Yes, I have a customized schema, but it is based on the pre-existing schema. I tried the schema:TS 1.x Access/SQL (NI), which  came with TestStand, the results were the same. 

I have tried to run different sequences. On one computer, I always get only the first character of each string entry logged in the remote database, however for the local server, everything is fine. On the other computer, there is no local SQL server, I always get similar error message as I mentioned in my post. The sequence step reports error is  "Log Results to Database".

Any more suggestion?

Thanks again.

Best regards,

Jaso

 

0 Kudos
Message 3 of 25
(5,095 Views)

Jaso,

I believe that the issue might be occurring because there is something different between the databases you are trying to access.  In the past these errors occur when privilages do not let TestStand perform a certain operation.  Could you check, using the database viewer, that you can append records to the database from the TestStand computer?  Try doing this manually in the table view and also with an SQL statement.  This would help us troubleshoot the permissions issue.

Also, it would be helpful if you could recreate the databases in the machines that are causing the error.  For some reasons, the tables might have not been created correctly causing the error.  Please try to recreate the database and let me know if it help solve the issue.

 

Regards,

Santiago D

0 Kudos
Message 4 of 25
(5,087 Views)

Hello Santiago D

For the computer which has local SQL server,  it only logs the first character to the remote table, I do not see anything difference when I append a record to the table both in local and in remote database. Doing manually or using SQL statement are fine.

For the computer which does not have local SQL server, it can not log test results to the table, there is something different when I append record to the table. When I use SQL statement, there is no error. When I do manually in the database viewer, a "Microsoft DataGrid Control" alert window pops up and shows "Connection failure". Record is not written to the table.

I have tried to recreate new dabase using the sql with TestStand. No difference.

Thanks and best regards,

Jaso

0 Kudos
Message 5 of 25
(5,078 Views)
Jaso,
 
It seems that each of you databases might have different issues that are causing the different behaviors.  Are they all MS SQL Servers?  Are they all configured in the same way?  Did you take a look at the permissions you have available in each of these databases?  Are they all the same?
 
I am also curious to see how you are connecting to the different databases.  Have you created a DSN for each database?  If so, what driver did you use for each one?
 
When you say that only the first character of a string is logged, what particular field and table are you referring to?
 
I would also try creating a simple Sequence with a Pass/Fail Step, and String Value Test and see if the behavior is reproducible in that way.
 
What would also be helpful would be for you to get in contact with your database administrator to find out what might be causing the issue.  It seems to be related to the database configuration.
 
 
Regards,
 
Santiago D
0 Kudos
Message 6 of 25
(5,054 Views)

Hi Santiago D

I am sure the database has no problem as I tried from a third computer everything is working fine. Also I tried to create new database and tables. This problem looks like computer related. I tried to login the same user from different computers. The result is the same with the original user on each computor.

I tried to use database logging steps to get access to the database and found that there is an error

"Microsoft OLE DB Provider for SQL Server:    Cursor operation conflict"

when I put a record. This only happened when I run the sequence from the computer not logging data properly. The same sequence ran fine on computer logging data properly.

Any further input would be appreciated.

Thanks.

Jaso

0 Kudos
Message 7 of 25
(5,024 Views)
Jaso,
 
I am glad to hear that you were able to get TestStand to log correctly from the third computer.  This is a good start.  Now we need to find out what is the difference between this computer and the other two computers that are not logging correctly to the remote database.  If all these computers are logging to the same database, using the same driver and the same Sequence, but two of the aren't doing it correctly, there must be something different between the computers that is causing the issue.
 
Please make sure that you are using the same Database Schema in all of the computers.  Furthermore, make sure that you are using the same Process Model in all three computers.  In order to fix this issue I will need you to find what is different between the two computers that are not logging correctly and the one that is.  Once you have determined these differences, start trying to make the two computers that are not logging correctly as similar to the one that is logging correctly.  In this way you will be able to find the source of the problem.
 
 
Regards,
 
Santiago D
0 Kudos
Message 8 of 25
(5,003 Views)

I have found the problem at last. Hope the solution will help somebody else who may encounter the same problem.

The reason is the "Language Settings for the System". I set Simplified Chinese as default. This caused the communication and one character logging problem. It's a software compatibility problem. Only setting Simplified Chinese as default will cause the problem. The installation of the language support will not.

Communication problem is database access driver related. I think Microsoft realized this problem as MDAC 2.8 can solve this.

I think logging only the first character is a TestStand compatibility problem. I have tried TestStand 3.5 and used database steps to log data. It still can only log the first character. NI may need to have a look at this.

Thank you very much for your help, Santiago D.

Jaso

0 Kudos
Message 9 of 25
(4,946 Views)

Jaso -
Thank you for letting us know how you fixed the problem. If you have some time, can you give me some more information:

1) Can you let me know what OS you are using? Was it originally an English version or a Simplified Chinese version of the OS?

2) Do you have a Microsoft ID for the bug you are referencing in the driver that you said should be fixed in MDAC 2.8?  What version of MDAC were you using that had the problem?

3) What tables and columns in the schema had the problem?

Scott Richardson
https://testeract.com
0 Kudos
Message 10 of 25
(4,929 Views)