Update(Int32,Int32,Int32,Double,DBDouble,DBDouble,Boolean,Boolean,Boolean,Boolean,DBDouble,DBDouble,Boolean,Boolean,DBInt,DBInt,DBInt,DBInt,DBInt,DBInt,DBInt,DBInt,DBInt,DBDouble,DBInt,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBDouble,DBInt,Int32,DBInt,DBInt,DBString,DateTime) Method
- Last UpdatedNov 06, 2025
- 9 minute read
'Declaration
Public Overloads Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal qmSpecId As Integer, _
ByVal charId As Integer, _
ByVal target As Double, _
ByVal lsv As DBDouble, _
ByVal usv As DBDouble, _
ByVal lsvIsOffset As Boolean, _
ByVal usvIsOffset As Boolean, _
ByVal lsvOffsetIsPct As Boolean, _
ByVal usvOffsetIsPct As Boolean, _
ByVal lrv As DBDouble, _
ByVal urv As DBDouble, _
ByVal lrvIsMult As Boolean, _
ByVal urvIsMult As Boolean, _
ByVal severityCd As DBInt, _
ByVal planId As DBInt, _
ByVal sampleSizeSource As DBInt, _
ByVal normalSampleSize As DBInt, _
ByVal minimumSampleSize As DBInt, _
ByVal maximumSampleSize As DBInt, _
ByVal clSource As DBInt, _
ByVal samplesForCl As DBInt, _
ByVal samplesBeforeCl As DBInt, _
ByVal stdAvg As DBDouble, _
ByVal stdAvgIsTarget As DBInt, _
ByVal stdDeviation As DBDouble, _
ByVal clXbar As DBDouble, _
ByVal lclXbar As DBDouble, _
ByVal uclXbar As DBDouble, _
ByVal clRange As DBDouble, _
ByVal lclRange As DBDouble, _
ByVal uclRange As DBDouble, _
ByVal clSigma As DBDouble, _
ByVal lclSigma As DBDouble, _
ByVal uclSigma As DBDouble, _
ByVal clIx As DBDouble, _
ByVal lclIx As DBDouble, _
ByVal uclIx As DBDouble, _
ByVal clImr As DBDouble, _
ByVal lclImr As DBDouble, _
ByVal uclImr As DBDouble, _
ByVal clMa As DBDouble, _
ByVal lclMa As DBDouble, _
ByVal uclMa As DBDouble, _
ByVal clMr As DBDouble, _
ByVal lclMr As DBDouble, _
ByVal uclMr As DBDouble, _
ByVal clMs As DBDouble, _
ByVal lclMs As DBDouble, _
ByVal uclMs As DBDouble, _
ByVal clP As DBDouble, _
ByVal lclP As DBDouble, _
ByVal uclP As DBDouble, _
ByVal clNp As DBDouble, _
ByVal lclNp As DBDouble, _
ByVal uclNp As DBDouble, _
ByVal clC As DBDouble, _
ByVal lclC As DBDouble, _
ByVal uclC As DBDouble, _
ByVal clU As DBDouble, _
ByVal lclU As DBDouble, _
ByVal uclU As DBDouble, _
ByVal defaultChart As DBInt, _
ByVal automatedColl As Integer, _
ByVal timeInterval As DBInt, _
ByVal timeIntUnit As DBInt, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim qmSpecId As Integer
Dim charId As Integer
Dim target As Double
Dim lsv As DBDouble
Dim usv As DBDouble
Dim lsvIsOffset As Boolean
Dim usvIsOffset As Boolean
Dim lsvOffsetIsPct As Boolean
Dim usvOffsetIsPct As Boolean
Dim lrv As DBDouble
Dim urv As DBDouble
Dim lrvIsMult As Boolean
Dim urvIsMult As Boolean
Dim severityCd As DBInt
Dim planId As DBInt
Dim sampleSizeSource As DBInt
Dim normalSampleSize As DBInt
Dim minimumSampleSize As DBInt
Dim maximumSampleSize As DBInt
Dim clSource As DBInt
Dim samplesForCl As DBInt
Dim samplesBeforeCl As DBInt
Dim stdAvg As DBDouble
Dim stdAvgIsTarget As DBInt
Dim stdDeviation As DBDouble
Dim clXbar As DBDouble
Dim lclXbar As DBDouble
Dim uclXbar As DBDouble
Dim clRange As DBDouble
Dim lclRange As DBDouble
Dim uclRange As DBDouble
Dim clSigma As DBDouble
Dim lclSigma As DBDouble
Dim uclSigma As DBDouble
Dim clIx As DBDouble
Dim lclIx As DBDouble
Dim uclIx As DBDouble
Dim clImr As DBDouble
Dim lclImr As DBDouble
Dim uclImr As DBDouble
Dim clMa As DBDouble
Dim lclMa As DBDouble
Dim uclMa As DBDouble
Dim clMr As DBDouble
Dim lclMr As DBDouble
Dim uclMr As DBDouble
Dim clMs As DBDouble
Dim lclMs As DBDouble
Dim uclMs As DBDouble
Dim clP As DBDouble
Dim lclP As DBDouble
Dim uclP As DBDouble
Dim clNp As DBDouble
Dim lclNp As DBDouble
Dim uclNp As DBDouble
Dim clC As DBDouble
Dim lclC As DBDouble
Dim uclC As DBDouble
Dim clU As DBDouble
Dim lclU As DBDouble
Dim uclU As DBDouble
Dim defaultChart As DBInt
Dim automatedColl As Integer
Dim timeInterval As DBInt
Dim timeIntUnit As DBInt
Dim lastEditComment As DBString
Dim lastEditAt As Date
QmSpecCharLink.Update(sessionId, qmSpecId, charId, target, lsv, usv, lsvIsOffset, usvIsOffset, lsvOffsetIsPct, usvOffsetIsPct, lrv, urv, lrvIsMult, urvIsMult, severityCd, planId, sampleSizeSource, normalSampleSize, minimumSampleSize, maximumSampleSize, clSource, samplesForCl, samplesBeforeCl, stdAvg, stdAvgIsTarget, stdDeviation, clXbar, lclXbar, uclXbar, clRange, lclRange, uclRange, clSigma, lclSigma, uclSigma, clIx, lclIx, uclIx, clImr, lclImr, uclImr, clMa, lclMa, uclMa, clMr, lclMr, uclMr, clMs, lclMs, uclMs, clP, lclP, uclP, clNp, lclNp, uclNp, clC, lclC, uclC, clU, lclU, uclU, defaultChart, automatedColl, timeInterval, timeIntUnit, lastEditComment, lastEditAt)
public static void Update(
int sessionId,
int qmSpecId,
int charId,
double target,
DBDouble lsv,
DBDouble usv,
bool lsvIsOffset,
bool usvIsOffset,
bool lsvOffsetIsPct,
bool usvOffsetIsPct,
DBDouble lrv,
DBDouble urv,
bool lrvIsMult,
bool urvIsMult,
DBInt severityCd,
DBInt planId,
DBInt sampleSizeSource,
DBInt normalSampleSize,
DBInt minimumSampleSize,
DBInt maximumSampleSize,
DBInt clSource,
DBInt samplesForCl,
DBInt samplesBeforeCl,
DBDouble stdAvg,
DBInt stdAvgIsTarget,
DBDouble stdDeviation,
DBDouble clXbar,
DBDouble lclXbar,
DBDouble uclXbar,
DBDouble clRange,
DBDouble lclRange,
DBDouble uclRange,
DBDouble clSigma,
DBDouble lclSigma,
DBDouble uclSigma,
DBDouble clIx,
DBDouble lclIx,
DBDouble uclIx,
DBDouble clImr,
DBDouble lclImr,
DBDouble uclImr,
DBDouble clMa,
DBDouble lclMa,
DBDouble uclMa,
DBDouble clMr,
DBDouble lclMr,
DBDouble uclMr,
DBDouble clMs,
DBDouble lclMs,
DBDouble uclMs,
DBDouble clP,
DBDouble lclP,
DBDouble uclP,
DBDouble clNp,
DBDouble lclNp,
DBDouble uclNp,
DBDouble clC,
DBDouble lclC,
DBDouble uclC,
DBDouble clU,
DBDouble lclU,
DBDouble uclU,
DBInt defaultChart,
int automatedColl,
DBInt timeInterval,
DBInt timeIntUnit,
DBString lastEditComment,
ref DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method.
- qmSpecId
- Required. Holds the ID assigned to the specification which is being linked.
- charId
- Required. Holds the ID assigned to the characteristic which is being linked.
- target
- Required. Holds the target value for this characteristic.
- lsv
- Required. Holds the lower specification value.
- usv
- Required. Holds the upper specification value.
- lsvIsOffset
- Required. Holds a logical data type which is a flag if lsv is the difference between target and lsl, i.e. lsv is not equal to lower spec limit (lsl) but is an offset.
- usvIsOffset
- Required. Holds a logical data type which is a flag if usv is the difference between usl and target, i.e. usv is not equal to upper spec limit (usl) but is an offset.
- lsvOffsetIsPct
- Required. Holds a logical data type which is a flag if lsv is an offset, is it a percent of the target.
- usvOffsetIsPct
- Required. Holds a logical data type which is a flag if usv is an offset, is it a percent of the target.
- lrv
- Required. Holds the lower reasonable value.
- urv
- Required. Holds the upper reasonable value.
- lrvIsMult
- Required. Holds a logical data type which is a flag if lrv is a multiplier for the difference between the lower spec limits and target, to find offset from target for lrl; if not, lrv = lower reasonable limit (an absolute value).
- urvIsMult
- Required. Holds a logical data type which is a flag if urv is a multiplier for the difference between the upper spec limits and target, to find offset from target for url; if no, urv = upper reasonable limit (an absolute value).
- severityCd
- Required. Holds the severity of the characteristic.
- planId
- Unused. Holds the ID of the plan. This will be ignored and null will be stored in the database.
- sampleSizeSource
- Required. Holds the source of the sample size.
- normalSampleSize
- Required. Holds the normal number of measurements in a sample.
- minimumSampleSize
- Required. Holds the minimum number of measurements in a sample.
- maximumSampleSize
- Required. Holds the maximum number of measurements in a sample.
- clSource
Required. Holds an enumeration that indicates the control limit source.
0 = automatically calculate from data (default)
1 = compute from standard mean and standard deviation values (if variable) or compute from standard p, np average proportion and standard c, u average number per unit values (if attribute)
2 = use preset values
- samplesForCl
- Required. Holds the number of samples to use for the calculation of control limits.
- samplesBeforeCl
- Required. Holds the number of samples required before control limits are calculated.
- stdAvg
Required. Holds the standard average value.
If cl_source = 1 and type is variable, this is the standard mean.
If type is binary attribute, this is the standard p, np average proportion value.
If type is counted attribute this is the standard c, u average number per unit value.
- stdAvgIsTarget
- Required. Holds the value 1 to use the target instead of the std_avg value as the standard, else 0. If not null, used to override the std_avg_is_target setting for the characteristic.
- stdDeviation
- Required. Holds the standard deviation value.
- clXbar
- Required. Holds the center line for xbar chart.
- lclXbar
- Required. Holds the lower control limit for xbar chart.
- uclXbar
- Required. Holds the upper control limit for xbar chart.
- clRange
- Required. Holds the center line for range.
- lclRange
- Required. Holds the lower control limit for range.
- uclRange
- Required. Holds the upper control limit for range.
- clSigma
- Required. Holds the center line for sigma.
- lclSigma
- Required. Holds the lower control limit for sigma.
- uclSigma
- Required. Holds the upper control limit for sigma.
- clIx
- Required. Holds the center line for individual x.
- lclIx
- Required. Holds the lower control limit for individual x.
- uclIx
- Required. Holds the upper control limit for individual x.
- clImr
- Required. Holds the center line for individual moving range.
- lclImr
- Required. Holds the lower control limit for individual moving range.
- uclImr
- Required. Holds the upper control limit for individual moving range.
- clMa
- Required. Holds the center line for moving average.
- lclMa
- Required. Holds the lower control limit for moving average.
- uclMa
- Required. Holds the upper control limit for moving average.
- clMr
- Required. Holds the center line for moving range.
- lclMr
- Required. Holds the lower control limit for moving range.
- uclMr
- Required. Holds the upper control limit for moving range.
- clMs
- Required. Holds the center line for moving sigma.
- lclMs
- Required. Holds the lower control limit for moving sigma.
- uclMs
- Required. Holds the upper control limit for moving sigma.
- clP
- Required. Holds the center line for p.
- lclP
- Required. Holds the lower control limit for p.
- uclP
- Required. Holds the upper control limit for p.
- clNp
- Required. Holds the center line for np.
- lclNp
- Required. Holds the lower control limit for np.
- uclNp
- Required. Holds the upper control limit for np.
- clC
- Required. Holds the center line for c.
- lclC
- Required. Holds the lower control limit for c.
- uclC
- Required. Holds the upper control limit for c.
- clU
- Required. Holds the center line for u.
- lclU
- Required. Holds the lower control limit for u.
- uclU
- Required. Holds the upper control limit for u.
- defaultChart
Optional. Holds an enumeration that specifies the default chart type for the characteristic.
2 = Xbar + Range
3 = Xbar + Sigma
5 = IX + MR (the default)
7 = MA + Range
8 = MA + Sigma
16 = p
17 = np
18 = u
19 = c
20 = DPMO (coding per QI Analyst)
- automatedColl
Required. Holds an enumeration that indicates whether this characteristic can be collected automatically.
0 = No
1 = Yes
2 = Use the characteristic's automated_coll setting (the default)
- timeInterval
Required. If sample size > 1 and automated_coll is Yes, holds the interval between the measurements.
Note that this is a default for the characteristic, which can be overridden independently at each SRO.
- timeIntUnit
Required. Holds an enumeration that indicates the units of the time interval between the measurements.
0 = seconds
1 = minutes
2 = hours
- lastEditComment
- Required. Holds the new comment that describes why this record is being updated.
- lastEditAt
Required. Holds the date/time when this record was added or last updated, for optimistic concurrency control. 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.
A QM specification-characteristic link's display_seq column value is used to determine the order of the characteristic link records returned by the Sample.GetChars() method. The record order is determined in sequence by the specification's display_seq value, the specification-characteristic link's spec_id value, and then the specification-characteristic link's display_seq value.
- If two or more specifications in the returned characteristic link dataset have the same display_seq value (e.g., 2), then the specification-characteristic links are ordered by their spec_id value within that specification display_seq value subgroup.
- If two or more specification-characteristic links in the returned characteristic link dataset have the same spec_id value, then those links are ordered by the specification-characteristic link's display_seq value.
Because the displaySeq parameter is not included in this overload of the Update() method, the display_seq column for specification-characteristic links updated by this overload will have the default value of 1.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Required DB* parameters: Must pass a value. To clear the existing value and enter an empty value, pass DB*.null (e.g., DBInt.null).