Compile function Copy_LOT_EVENT_TYPE_Record_To_SQL(Connection, Key, Record)

/*****************************************************************************\
	Copies the given OPERATION record to the MSSQL database.
	
	History
	-------
	06/19/2025    DJS   Original Programmer
\*****************************************************************************/

$insert LOT_EVENT_TYPE_EQUATES

Declare function SQL_Write, SQL_Write_MV, SQL_Format
Ans = ""

// Parse record into a dimensioned array for speed
Dim Rec(2)
MatParse Record into Rec
					    
// List of key names and their values
Keys = "LOT_EVENT_TYPE_ID":@VM:SQL_Format(Key, "STR")

// List of data fields and their values
DataFields  = "DESCRIPTION"       :@VM:SQL_Format(Rec(LOT_EVENT_TYPE.DESCRIPTION$),    "STR"):@FM
DataFields := "WIP_TRANS_TYPE"    :@VM:SQL_Format(Rec(LOT_EVENT_TYPE.WIP_TRANS_TYPE$), "STR")

// Symbolics

// Write the data to the SQL database
Ans = SQL_Write(Connection, "LOT_EVENT_TYPE", Keys, DataFields);

//-------------------------------------------------------------------------------------------------
// Multi-valued Fields

Return Ans
