UpdateSpecific Method (Sample)
- Last UpdatedNov 06, 2025
- 5 minute read
The UpdateSpecific() method updates selected columns of the specified sample record in the Sample table.
'Declaration
Public Shared Sub UpdateSpecific( _
ByVal sessionId As Integer, _
ByVal sampleId As Integer, _
ByVal entId As Nullable(Of Integer), _
ByVal sampleName As DBString, _
ByVal itemId As DBString, _
ByVal woId As DBString, _
ByVal operId As DBString, _
ByVal seqNo As DBInt, _
ByVal contextEntId As DBInt, _
ByVal contextItemId As DBString, _
ByVal itemCategoryId As DBInt, _
ByVal processId As DBString, _
ByVal contextOperId As DBString, _
ByVal freqId As DBInt, _
ByVal segmentRequirementId As DBString, _
ByVal segmentResponseId As DBString, _
ByVal lotNo As DBString, _
ByVal subLotNo As DBString, _
ByVal requestedTimeLocal As Nullable(Of Date), _
ByVal expiryTimeLocal As DBDateTime, _
ByVal warningTimeLocal As DBDateTime, _
ByVal pulledBy As DBString, _
ByVal pulledTimeLocal As DBDateTime, _
ByVal final As Nullable(Of Boolean), _
ByVal finalizedBy As DBString, _
ByVal finalizedAtLocal As DBDateTime, _
ByVal verifiedBy As DBString, _
ByVal sampleStatus As Nullable(Of Integer), _
ByVal sampleResult As DBInt, _
ByVal priority As DBInt, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Nullable(Of Date) _
)
'Usage
Dim sessionId As Integer
Dim sampleId As Integer
Dim entId As Nullable(Of Integer)
Dim sampleName As DBString
Dim itemId As DBString
Dim woId As DBString
Dim operId As DBString
Dim seqNo As DBInt
Dim contextEntId As DBInt
Dim contextItemId As DBString
Dim itemCategoryId As DBInt
Dim processId As DBString
Dim contextOperId As DBString
Dim freqId As DBInt
Dim segmentRequirementId As DBString
Dim segmentResponseId As DBString
Dim lotNo As DBString
Dim subLotNo As DBString
Dim requestedTimeLocal As Nullable(Of Date)
Dim expiryTimeLocal As DBDateTime
Dim warningTimeLocal As DBDateTime
Dim pulledBy As DBString
Dim pulledTimeLocal As DBDateTime
Dim final As Nullable(Of Boolean)
Dim finalizedBy As DBString
Dim finalizedAtLocal As DBDateTime
Dim verifiedBy As DBString
Dim sampleStatus As Nullable(Of Integer)
Dim sampleResult As DBInt
Dim priority As DBInt
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Nullable(Of Date)
Sample.UpdateSpecific(sessionId, sampleId, entId, sampleName, itemId, woId, operId, seqNo, contextEntId, contextItemId, itemCategoryId, processId, contextOperId, freqId, segmentRequirementId, segmentResponseId, lotNo, subLotNo, requestedTimeLocal, expiryTimeLocal, warningTimeLocal, pulledBy, pulledTimeLocal, final, finalizedBy, finalizedAtLocal, verifiedBy, sampleStatus, sampleResult, priority, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void UpdateSpecific(
int sessionId,
int sampleId,
Nullable<int> entId,
DBString sampleName,
DBString itemId,
DBString woId,
DBString operId,
DBInt seqNo,
DBInt contextEntId,
DBString contextItemId,
DBInt itemCategoryId,
DBString processId,
DBString contextOperId,
DBInt freqId,
DBString segmentRequirementId,
DBString segmentResponseId,
DBString lotNo,
DBString subLotNo,
Nullable<DateTime> requestedTimeLocal,
DBDateTime expiryTimeLocal,
DBDateTime warningTimeLocal,
DBString pulledBy,
DBDateTime pulledTimeLocal,
Nullable<bool> final,
DBString finalizedBy,
DBDateTime finalizedAtLocal,
DBString verifiedBy,
Nullable<int> sampleStatus,
DBInt sampleResult,
DBInt priority,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
ref Nullable<DateTime> lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- sampleId
- Required. Holds the ID assigned to this record when it was added. The sampleId parameter is used by other methods that modify or delete this type of record.
- entId
- Optional. Holds the ID of the entity at which the sample was generated.
- sampleName
- Optional. Holds the sample name (created according to sample_plan.sample_name).
- itemId
- Optional. Holds the ID of the item from which the sample was generated.
- woId
- Optional. Holds the ID of the work order that is used to identify the job for which the sample was generated.
- operId
- Optional. Holds the ID of the operation that is used to identify the job for which the sample was generated.
- seqNo
- Optional. Holds the sequence number that is used to identify the job for which the sample was generated.
- contextEntId
- Optional. Holds the ID of the entity or entity class for the specification that caused the sample to be generated.
- contextItemId
- Optional. Holds the ID of the item for the specification that caused the sample to be generated; if not null, item_category_id must be null.
- itemCategoryId
- Optional. Holds the ID of the item category for the specification that caused the sample to be generated; if not null, item_id must be null.
- processId
- Optional. Holds the ID of the process for the specification that caused the sample to be generated. The processId and contextOperId must both be null or must both be non-null.
- contextOperId
- Optional. Holds the ID of the operation for the specification that caused the sample to be generated. The processId and contextOperId must both be null or must both be non-null.
- freqId
- Optional. Holds the ID of the sample plan frequency based upon which the sample was generated.
- segmentRequirementId
- Optional. User-specified S95 field.
- segmentResponseId
- Optional. User-specified S95 field.
- lotNo
- Optional. Holds the number of the lot from which the sample was pulled.
- subLotNo
- Optional. Holds the number of the sublot from which the sample was pulled.
- requestedTimeLocal
- Optional. Holds the local date/time when the sample was requested (readied).
- expiryTimeLocal
- Optional. Holds the local date/time when the sample request expires.
- warningTimeLocal
- Optional. Holds the local date/time when does the sample request turn to READY WARNING.
- pulledBy
- Optional. Holds the name of the person who pulled the sample.
- pulledTimeLocal
- Optional. Holds the local date/time when the sample was pulled.
- final
- Optional. Holds the flag that indicates whether the sample has been marked as final, which would prohibit editing of any data associated with this sample.
- finalizedBy
- Optional. Holds the name of the person who marked the sample as final.
- finalizedAtLocal
- Optional. Holds the local date/time when the sample was marked as final.
- verifiedBy
- Optional. Holds the name of the person who verified the sample.
- sampleStatus
- Optional. Specifies the status of the sample. 1 = READY, 2 = READY WARNING, 3 = MISSED, 4 = IN PROGRESS, 5 = LATE, 6 = COMPLETE, 7 = COMPLETE LATE, 8 = CANCELLED.
- sampleResult
- Optional. Specifies the result state of the sample. 1 = PENDING , 2 = GOOD, 3 = OOC, 4 = OOS, 5 = OOC KEY, 6 = OOS KEY, 7 = OOC CRITICAL, 8 = OOS CRITICAL.
- priority
- Optional. Holds the priority of measuring the sample.
- spare1
- Optional. Holds the contents of the user-defined spare1 field.
- spare2
- Optional. Holds the contents of the user-defined spare2 field.
- spare3
- Optional. Holds the contents of the user-defined spare3 field.
- spare4
- Optional. Holds the contents of the user-defined spare4 field.
- lastEditComment
- Optional. Holds comments that describe why this record is being modified.
- lastEditAt
Optional input. Holds the date/time when this record was added or last updated, for optimistic concurrency control. If it is specified, the passed value must match the lastEditAt value in the record for the update to succeed.
Output. Holds the date/time value when the record was updated by this method.
Observe the following input parameter rules:
- Optional non-DB* parameters: Either enter a new value or leave the existing value unchanged by passing a null.
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional DB* parameters: To clear the existing value and enter an empty value, pass DB*.null (e.g., DBInt.null). To leave the existing value unchanged, pass a null.