added in export for reactor modes to sql, also added in owner column
This commit is contained in:
parent
d7215cfa9a
commit
c20f94a26f
60
LSL2/STPROC/COPY_REACTOR_MODES_RECORD_TO_SQL.txt
Normal file
60
LSL2/STPROC/COPY_REACTOR_MODES_RECORD_TO_SQL.txt
Normal file
@ -0,0 +1,60 @@
|
||||
Compile function Copy_REACTOR_MODES_Record_To_SQL(Connection, Key, Record)
|
||||
|
||||
/*****************************************************************************\
|
||||
Copies the given COC record to the MSSQL database.
|
||||
|
||||
History
|
||||
-------
|
||||
04/14/2010 KRF Original Programmer
|
||||
\*****************************************************************************/
|
||||
|
||||
$insert REACTOR_MODES_EQUATES
|
||||
|
||||
Declare function SQL_Write, SQL_Write_MV, SQL_Format
|
||||
Ans = ""
|
||||
|
||||
// Parse record into a dimensioned array for speed
|
||||
Dim Rec(14)
|
||||
MatParse Record into Rec
|
||||
|
||||
// List of key names and their values
|
||||
Keys = "MODE":@VM:SQL_Format(Key, "STR")
|
||||
|
||||
// List of data fields and their values
|
||||
DataFields = "E10_STATE" :@VM:SQL_Format(Rec(REACTOR_MODES_E10_STATE$), "STR"):@FM
|
||||
DataFields := "DESCRIPTION" :@VM:SQL_Format(Rec(REACTOR_MODES_DESCRIPTION$), "STR"):@FM
|
||||
DataFields := "SECURITY_LEVEL" :@VM:SQL_Format(Rec(REACTOR_MODES_SECURITY_LEVEL$), "STR"):@FM
|
||||
DataFields := "MODE_CATEGORY" :@VM:SQL_Format(Rec(REACTOR_MODES_MODE_CATEGORY$), "STR"):@FM
|
||||
DataFields := "ICON" :@VM:SQL_Format(Rec(REACTOR_MODES_ICON$), "STR"):@FM
|
||||
DataFields := "NOTIFICATION_ACTIVE" :@VM:SQL_Format(Rec(REACTOR_MODES_NOTIFICATION_ACTIVE$), "BOOL"):@FM
|
||||
DataFields := "OWNER" :@VM:SQL_Format(Rec(REACTOR_MODES_OWNER$), "STR")
|
||||
|
||||
// Symbolics
|
||||
|
||||
|
||||
// Write the data to the SQL database
|
||||
Ans = SQL_Write(Connection, "REACTOR_MODES", Keys, DataFields);
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Multi-valued Fields
|
||||
|
||||
// Shipping Details
|
||||
* If Ans EQ "" AND Rec(COC_ORDER_NO$) NE "" then
|
||||
*
|
||||
* // List of data fields and their values
|
||||
* MvFields = "ORDER_NO" :@FM:SQL_Format(Rec(COC_ORDER_NO$), "INT"):@RM
|
||||
* MvFields := "ORDER_LINE":@FM:SQL_Format(Rec(COC_ORDER_LINE$), "INT"):@RM
|
||||
* MvFields := "RDS_NO" :@FM:SQL_Format(Rec(COC_RDS_NO$), "STR"):@RM
|
||||
* MvFields := "PART_NUM" :@FM:SQL_Format(Rec(COC_PART_NUM$), "STR"):@RM
|
||||
* MvFields := "LOT_NUM" :@FM:SQL_Format(Rec(COC_LOT_NUM$), "STR"):@RM
|
||||
* MvFields := "REACTOR" :@FM:SQL_Format(Rec(COC_REACTOR$), "INT"):@RM
|
||||
* MvFields := "REJECTS" :@FM:SQL_Format(Rec(COC_REJECTS$), "INT"):@RM
|
||||
* MvFields := "WAFER_QTY" :@FM:SQL_Format(Rec(COC_WAFER_QTY$), "INT")
|
||||
*
|
||||
* // Write the data to the SQL database
|
||||
* Ans = SQL_Write_MV(Connection, "COC_SHIPPING_DETAILS", Keys, MvFields);
|
||||
*
|
||||
* end
|
||||
|
||||
|
||||
Return Ans
|
@ -20,5 +20,6 @@ Equ REACTOR_MODES_NOTIFICATION_ACTIVE$ To 10
|
||||
Equ REACTOR_MODES_NOTIFY_CLASS$ To 11
|
||||
Equ REACTOR_MODES_MODES_ENTER$ To 12
|
||||
Equ REACTOR_MODES_MODES_RELEASE$ To 13
|
||||
Equ REACTOR_MODES_OWNER$ To 14
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user