Add(Int32,String,DBString,Nullable<Int32>,String,DateTime,DBDateTime,DBInt,DBString,DBInt,DBString,DBString,Nullable<Int32>,DBInt,DBInt,DBString,DBString,DBString,DBString,DBString,DateTime,Int32) Method
- Last UpdatedNov 06, 2025
- 4 minute read
The Add() method adds a new specification record to the Qm_Spec table.
'Declaration
Public Overloads Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal qmSpecName As String, _
ByVal qmSpecDesc As DBString, _
ByVal editLevel As Nullable(Of Integer), _
ByVal verId As String, _
ByVal startEffLocal As Date, _
ByVal endEffLocal As DBDateTime, _
ByVal entId As DBInt, _
ByVal itemId As DBString, _
ByVal itemCategoryId As DBInt, _
ByVal processId As DBString, _
ByVal operId As DBString, _
ByVal categoryId As Nullable(Of Integer), _
ByVal planId As DBInt, _
ByVal numberPointsPerPage 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 Date, _
ByRef qmSpecId As Integer _
)
'Usage
Dim sessionId As Integer
Dim qmSpecName As String
Dim qmSpecDesc As DBString
Dim editLevel As Nullable(Of Integer)
Dim verId As String
Dim startEffLocal As Date
Dim endEffLocal As DBDateTime
Dim entId As DBInt
Dim itemId As DBString
Dim itemCategoryId As DBInt
Dim processId As DBString
Dim operId As DBString
Dim categoryId As Nullable(Of Integer)
Dim planId As DBInt
Dim numberPointsPerPage 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 Date
Dim qmSpecId As Integer
QmSpec.Add(sessionId, qmSpecName, qmSpecDesc, editLevel, verId, startEffLocal, endEffLocal, entId, itemId, itemCategoryId, processId, operId, categoryId, planId, numberPointsPerPage, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt, qmSpecId)
public static void Add(
int sessionId,
string qmSpecName,
DBString qmSpecDesc,
Nullable<int> editLevel,
string verId,
DateTime startEffLocal,
DBDateTime endEffLocal,
DBInt entId,
DBString itemId,
DBInt itemCategoryId,
DBString processId,
DBString operId,
Nullable<int> categoryId,
DBInt planId,
DBInt numberPointsPerPage,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
out DateTime lastEditAt,
out int qmSpecId
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method.
- qmSpecName
- Required. Holds the name of the specification.
- qmSpecDesc
- Optional. Holds the description of the specification.
- editLevel
- Optional. Holds the privilege level required to edit this record.
- verId
- Required. Holds the version of this specification.
- startEffLocal
- Required. Holds the local time when this version of this specification becomes effective. The date and time are relative to the entity if ent_id is not null. Otherwise, it is relative to the middleware server.
- endEffLocal
- Optional. Holds the local time when this version of this specification ceases to be effective. The date and time are relative to the entity if ent_id is not null. Otherwise, it is relative to the middleware server.
- entId
- Optional. Holds the entity or the entity class to which this specification applies.
- itemId
- Optional. Holds the item to which this specification applies.
- itemCategoryId
- Optional. Holds the item category to which this specification applies.
- processId
- Optional. Holds the process to which this specification applies.
- operId
- Optional. Holds the operation to which this specification applies.
- categoryId
- Optional. Holds the category to which this specification belongs.
- planId
- Required. Holds the default sample plan for this specification.
- numberPointsPerPage
- Optional. Holds the value for number of sample points per page for SPC Chart.
- spare1
- Optional. Holds a value defined by language term 5157.
- spare2
- Optional. Holds a value defined by language term 5158.
- spare3
- Optional. Holds a value defined by language term 5159.
- spare4
- Optional. Holds a value defined by language term 5160.
- lastEditComment
- Optional. Holds comments that describe why this record is being added.
- lastEditAt
- Out parameter. Holds the datetime that this record was added.
- qmSpecId
- Out parameter. Holds the ID assigned to this record when it is added. The qmSpecId parameter is used by other methods that modify or delete this type of record.
A QM specification's display_seq column value determines the order in which the specification record appears in a dataset returned by a QM specification Get method. If two or more specifications in the dataset have the same order value (e.g., 2), then those specifications are ordered alphabetically within that order value's subgroup. Because the displaySeq parameter is not included in this overload of the Add() method, the display_seq column for specifications added 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.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.