Update(Int32,Int32,String,DBString,Int32,DBDouble,DBInt,DBInt,DBInt,DBInt,DBInt,DBInt,DBInt,Int32,Boolean,DBInt,DBInt,DBInt,Int32,DBString,DBString,DBString,DBString,DBString,DateTime) Method
- Last UpdatedNov 06, 2025
- 5 minute read
'Declaration
Public Overloads Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal freqId As Integer, _
ByVal freqName As String, _
ByVal freqDesc As DBString, _
ByVal freqType As Integer, _
ByVal interval As DBDouble, _
ByVal intervalUnit As DBInt, _
ByVal prodResetOption As DBInt, _
ByVal offsetStart As DBInt, _
ByVal offsetStartUnit As DBInt, _
ByVal offsetEnd As DBInt, _
ByVal offsetEndUnit As DBInt, _
ByVal samplesPerShift As DBInt, _
ByVal multiplier As Integer, _
ByVal enabled As Boolean, _
ByVal expiryTime As DBInt, _
ByVal expiryUnit As DBInt, _
ByVal warningTime As DBInt, _
ByVal warningUnit As Integer, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim freqId As Integer
Dim freqName As String
Dim freqDesc As DBString
Dim freqType As Integer
Dim interval As DBDouble
Dim intervalUnit As DBInt
Dim prodResetOption As DBInt
Dim offsetStart As DBInt
Dim offsetStartUnit As DBInt
Dim offsetEnd As DBInt
Dim offsetEndUnit As DBInt
Dim samplesPerShift As DBInt
Dim multiplier As Integer
Dim enabled As Boolean
Dim expiryTime As DBInt
Dim expiryUnit As DBInt
Dim warningTime As DBInt
Dim warningUnit As Integer
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
SampleFreq.Update(sessionId, freqId, freqName, freqDesc, freqType, interval, intervalUnit, prodResetOption, offsetStart, offsetStartUnit, offsetEnd, offsetEndUnit, samplesPerShift, multiplier, enabled, expiryTime, expiryUnit, warningTime, warningUnit, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void Update(
int sessionId,
int freqId,
string freqName,
DBString freqDesc,
int freqType,
DBDouble interval,
DBInt intervalUnit,
DBInt prodResetOption,
DBInt offsetStart,
DBInt offsetStartUnit,
DBInt offsetEnd,
DBInt offsetEndUnit,
DBInt samplesPerShift,
int multiplier,
bool enabled,
DBInt expiryTime,
DBInt expiryUnit,
DBInt warningTime,
int warningUnit,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
ref DateTime lastEditAt
)
Parameters
- sessionId
Required. Holds the session ID and thus the user who is making this method.
- freqId
Required. Holds the ID of the sample frequency.
- freqName
Required. Holds the unique name of the sample plan frequency for display.
- freqDesc
Required. Holds the description of the sample plan frequency.
- freqType
Required. Holds the type of sample plan frequency.
0 = shift
1 (default) = calendar time
2 = run time
3 = production
4 = main item produced changes (job_bom.current_subst for bom_pos = 0)
5 = item consumed at any BOM position changes
6 = the lot number of the main item produced changes (job_bom.def_lot_no for bom_pos = 0)
7 = the lot number of an item consumed at any BOM position changes
8 = the job changes
9 = utilization changes from runtime to downtime
10 = utilization changes from runtime to idle time
11 = utilization changes from downtime to runtime
12 = utilization changes from downtime to idle time
13 = utilization changes from idle time to runtime
14 = utilization changes from idle time to downtime
15 = inventory is received
16 = a new specification value is downloaded for the job running on a job position
17 = a step with action_type 6 starts
18 = a step with action_type 6 finishes
- interval
Required. Holds the amount of time or production between samples.
- intervalUnit
Required. Holds an enumeration that indicates the units for the amount of time or production between samples:
0 = seconds
1= minutes
2 = hours
3 = days
4 = weeks
5 = units of product
6 = number of lots
7 = number of jobs
8 = number of segment responses: 0 – 4 are used when freq_type = 0, 1, or 2 (shift, calendar time, run time); 5 – 8 when freq_type = 3 (production)
- prodResetOption
Required. Holds an enumeration that indicates what causes the count of production between samples to be reset. Used only if freq_type = 3 (production).
0 = nothing (no reset ever)
1 = job changes on job_exec (disallowed if interval_unit = 7)
2 = main item produced changes
3 = shift changes on entity
4 = entity utilization changes from runtime or downtime to idle time
- offsetStart
Required. Holds the offset value from the start of the shift.
- offsetStartUnit
Required. Holds an enumeration that indicates the units for the offset value from the start of the shift:
1= minutes
2 = hours
3 = days
- offsetEnd
Required. Holds the offset value from the end of the shift.
- offsetEndUnit
Required. Holds an enumeration that indicates the units for the end of the shift:
1= minutes
2 = hours
3 = days
- samplesPerShift
Required. Holds the number of times to ready an event between the offsets from the ends of a shift.
- multiplier
- Required. Holds the sample size multiplier.
- enabled
- Required. Holds a flag that, if true, specifies that the sample frequency can be used at runtime.
- expiryTime
- Required. Holds the amount of time to wait for the sample to be pulled before changing its status to MISSING.
- expiryUnit
Required. Holds an enumeration that indicates the units for the expiryTime parameter:
1= minutes
2 = hours
3 = days
- warningTime
- Required. Holds the amount of time to wait for a sample to be pulled before changing its status to READY WARNING.
- warningUnit
Required. Holds an enumeration that indicates the units for the warningTime parameter:
1= minutes (default)
2 = hours
3 = days
- spare1
- Required. Holds a value defined by language term 5157.
- spare2
- Required. Holds a value defined by language term 5158.
- spare3
- Required. Holds a value defined by language term 5159.
- spare4
- Required. Holds a value defined by language term 5160.
- lastEditComment
- Required. Holds the new comment that describes why this record is being updated.
- lastEditAt
Optional. 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 called method.