Update Method (UserName)
- Last UpdatedNov 06, 2025
- 2 minute read
The Update() method updates all columns of the specified user name record in the User_Name table.
'Declaration
Public Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal userId As String, _
ByVal userDesc As DBString, _
ByVal active As Boolean, _
ByVal hourlyCost As DBDouble, _
ByVal langId As Integer, _
ByVal defaultDeptId As DBString, _
ByVal authMethod As Integer, _
ByVal defaultLabCd As DBString, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef modId As String _
)
'Usage
Dim sessionId As Integer
Dim userId As String
Dim userDesc As DBString
Dim active As Boolean
Dim hourlyCost As DBDouble
Dim langId As Integer
Dim defaultDeptId As DBString
Dim authMethod As Integer
Dim defaultLabCd As DBString
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim modId As String
UserName.Update(sessionId, userId, userDesc, active, hourlyCost, langId, defaultDeptId, authMethod, defaultLabCd, spare1, spare2, spare3, spare4, lastEditComment, modId)
public static void Update(
int sessionId,
string userId,
DBString userDesc,
bool active,
DBDouble hourlyCost,
int langId,
DBString defaultDeptId,
int authMethod,
DBString defaultLabCd,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
ref string modId
)
Parameters
- sessionId
Required. Holds the session ID and thus the user who is making this method call.
- userId
Required. Holds the ID of the user. For example, the employee number or name of the employee.
- userDesc
- Required. Holds the description for the user. For example, the name of the employee.
- active
- Required. Holds a flag that, if set to true, specifies that the state of the user is active in the MES system.
- hourlyCost
- Required. Holds the cost of the labour per hour.
- langId
- Required. Holds the ID of the user's preferred language.
- defaultDeptId
- Required. Holds the default department ID of the user.
- authMethod
- Required. Holds the authentication method. The value 0 indicates "Internal" and 1 indicates "Windows (future)".
- defaultLabCd
- Required. Holds the default labor code of the user.
- spare1
- Required. Holds the contents of the user-defined spare1 field.
- spare2
- Required. Holds the contents of the user-defined spare2 field.
- spare3
- Required. Holds the contents of the user-defined spare3 field.
- spare4
- Required. Holds the contents of the user-defined spare4 field.
- lastEditComment
- Required. Holds comments that describe why this record is being updated.
- modId
Required. Holds the modification ID assigned the last time this record was added or last updated, for optimistic concurrency control. The passed value must match the record's modId for the record to be updated.
Output. Holds the new modification ID to identify this update of this record.