NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

problem of Teststand3.1 database and microsoft SQL Server 2000 personal edition

I have a problem when using teststand database function with Microsoft sql server 2000. the error(seen in attached screenshot3.jpg) is:
 
"An error occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
An error occurred executing a statement.
Schema: Generic Recordset (NI).
Statement: UUT_RESULT.
[Microsoft][ODBC SQL Server Driver][SQL Server]unable to insert NULL value to column "ID", table "test.dbo.UUT_RESULT";This column is not alowed to be blank. INSERT Failed. Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
[Microsoft][ODBC SQL Server Driver][SQL Server]terminated.
Source: TSDBLog"

 Here I listed my proceess.
 
1, Configure in SQL Sever, please see attached screenshot0.jpg
   a, Open SQL
   b, build a new database with the name of test
   c, import the data from "C:\Program Files\National Instruments\TestStand 3.1\Components\NI\Models\TestStandModels\Database\TestStand Results.mdb"

2, Configure Microsoft SQL sever: please see attached screenshot1.jpg
   a, Open windows Control Panel and select "Data Sources (ODBC). Under system DSN tab, add a SQL server data source

3, Configure teststand database option, see attached screenshot2.jpg
   a, configure logging option, enable
   b, configure datalink
   c, select schemas of "Generic recordset (NI)
   d, No change on the tabs of "statements" and "Columns/Parameters"
 
4, run an seqence file with the proess model of SequentialModel.Seq.

 
0 Kudos
Message 1 of 5
(3,388 Views)

Jacky -
I have never tried to imprt a access database into SQL server. What are the steps to do this?

I would suspect that the datatype of the primary key field is not correct after the import. Have you tried to create the tables using the scripts located at: <TestStand>\Components\NI\Models\TestStandModels\Database\SQL Server Create Generic Recordset Result Tables.sql?  This file is designed to work with the TestStand database viewer, but it should work with SQL server as long as the syntax is correct.  Try creating the table with the script and see how the datatype and properties of the primary key column differ.

Scott Richardson
0 Kudos
Message 2 of 5
(3,374 Views)

Jacky -
I found the wizard to do the import. The ID column is imported properly: It is not a primary key, it is not an identity column. In addition, all of the other primary and foreign keys are not setup properly. You can either manually setup the table or try to use the script that I mentioned.

Scott Richardson
0 Kudos
Message 3 of 5
(3,370 Views)
Thanks Scott,
  The database function is OK now after I changed imported tables in SQL Sever.
  Actually, I once tried anothor method that you refered by using the scripts
located at: <TestStand>\Components\NI\Models\TestStandModels\Database\SQL Server Create Generic Recordset Result Tables.sql. Attached is the error screenshots, please help me on this.
 
Thanks
Jacky
0 Kudos
Message 4 of 5
(3,355 Views)

Jacky -
I am not sure why the script could not be generated. I will write down to look at that when I can. In general the predefined SQL scripts that TestStand installs are the better way to go.

Scott Richardson
0 Kudos
Message 5 of 5
(3,339 Views)