將數據插入 Access 資料庫時出現 TestStand Error -2147217900

更新 Feb 4, 2025

產品資訊

軟體

  • TestStand 2016 SP1

問題敘述

 A Non-Finite Value (NAN, INF, -INF, IND)登錄到資料庫時出現以下錯誤:

An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging' 
An error occurred executing a statement. 
Schema: Axcelis Schema With Preconditions 
Statement: STEP_NUMERICLIMIT. 

Description: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 10 (""): The supplied value is not a valid instance of data type float. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision 

Number: -2147217900 
NativeError: 8023 
SQLState: 42000 
Reported by: Microsoft OLE DB Provider for SQL Server 
Source: TSDBLog

我該做些什麼呢?

解決方案

因為 Microsoft SQL Server 不支持其 FLOAT 資料類型的非有限值,我們需要修改架構以過濾非有限值。

  1. 通過點擊Configure>> Result Processing...打開 Schemas 在 Result Processing 視窗中點擊Database行中的錘子和扳手圖標以打開 Database Options 對話框。
  2. 轉到 Schemas 選項並展開當前正在使用的 Schema。
  3. 我們將修改 PROP_RESULT 表。更改以下欄位/參數的“Precondition”表達式:

STEP_NUMERICLIMIT1.DATA

Logging.DatabaseOptions.IncludeOutputValues && Logging.StepResult.Numeric != NAN && Logging.StepResult.Numeric != INF && Logging.StepResult.Numeric != -INF && Logging.StepResult.Numeric != IND

PROP_MULTINUMERICLIMIT1.DATA

Logging.DatabaseOptions.IncludeOutputValues && Logging.PropertyResult.Data != NAN && Logging.PropertyResult.Data != INF && Logging.PropertyResult.Data != -INF && Logging.PropertyResult.Data != IND

  1. 如果您收到未知變量錯誤:

An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging' 
An error occurred evaluating a database statement/column precondition. 
Schema: Axcelis Schema With Preconditions 
Statement: MEAS_NUMERICLIMIT. 
Column: DATA 
Property: Measurement.[Measurement 0] 
Error in argument 1, 'Logging.StepResult.Numeric != NAN', in call to the expression function '#NoValidation'. 
Unknown variable or property name 'Logging.StepResult.Numeric'. 
Source: TSDBLog

嘗試修改 STEP_NUMERICLIMIT1.DATA 中 PROP_RESULT 表格中的Precondition :

""Logging.PropertyResult.Data" instead of "Logging.StepResult.Numeric
i.e: Logging.DatabaseOptions.IncludeOutputValues && (Logging.PropertyResult.Data != NAN) ​

  1. 重新啟動 TestStand 以重新載入對schema所做的更改。