Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

DelphiAdo Update Criteria

Shulou Source: shulou.com Published: 2022-06-03 04:34:23 10月01日 Update

The code causes each field that ADO includes in the WHERE clause. If you want to ensure that current user updates are successful if no changes have been made to any fields in the rows in the table, this value will be used in the Update condition property.

The constants available for this property are as follows:

AdCriteriaKey = 0

Uses only the primary key

AdCriteriaAllCols = 1

Uses all columns in the recordset

AdCriteriaUpdCols = 2 (Default)

Uses only the columns in the recordset that have been modified

AdCriteriaTimeStamp = 3

Uses the timestamp column (if available) in the recordset

Note: the specified adCriteriaTimeStamp may actually use the adCriteriaAllCols method to perform the update if there is no valid timestamp field in the table. In addition, the timestamp field does not have to be in the recordset itself.

/ / details of yarn order

With adods_YarnJobDetail_PO do

Begin

Active: = False

CommandText: = 'SELECT job_item_id=a.Iden,a.Reserved_Qty,a.Quantity,a.Order_Status,a.Yarn_Type,a.Yarn_Count,a.Color_Code' + # 13010 +

'FROM AX_YarnPPODetail a WITH (NOLOCK)' + # 13'10 +

'JOIN AX_YarnPPOHead c WITH (NOLOCK) ON a.PPO_No = c. PPON No' + # 13: 10 +

'LEFT JOIN SystemDb..pbYarnTypeList d WITH (NOLOCK) ON a.Yarn_Type = d.Yarnbread Type' + # 13mm 10 +

'LEFT JOIN systemdb..pbcustomerlist f WITH (NOLOCK) ON c.Customer_CD = f. Customized Code' + # 13010 +

'WHERE a.Yarn_Type =: Yarn_Type' + # 13010 +

'AND a.Yarn_Count =: Yarn_Count' + # 13010 +

'AND a.Quantity-Reserved_Qty > 0' + # 13010 +

'AND d.Flag' 'Nationals' + # 13010 +

'AND LOWER (a.Order_Status) =' 'confirmed''' + # 13010 +

'AND c.Ordership typeworthy Nightball poised boxes'

Parameters.ParamByName ('Yarn_Type') .Value: = vYarn_Type

Parameters.ParamByName ('Yarn_Count') .Value: = vYarn_Count

Open

Properties ['update criteria'] .value: = 1

End

Result: = true

Tags: Field update property time detail valid success code clause actual constant method condition user table order subcontract Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MySQL macOS Docker vpn