Compile subroutine Copy_ASM_PART_Record_To_SQL(Connection, Key, Record)

/*****************************************************************************\
	Copies the given ASM_PART record to the MSSQL database.
	
	History
	-------
	04/05/2010    KRF   Original Programmer
	04/21/2012    KRF   Dropped per David's Request, SQL_MFS Removed so this
	                    won't be called
\*****************************************************************************/

$insert ASM_PART_EQUATES

Declare function SQL_Write, SQL_Format
Ans = ""

// Parse record into a dimensioned array for speed
Dim Rec(7)
MatParse Record into Rec

// List of key names and their values
Keys  = "PART_NO":@VM:SQL_Format(Key, "STR")

// List of data fields and their values
DataFields  = "PART_TYPE"   :@VM:SQL_Format(Rec(ASM_PART_PART_TYPE$),    "STR"):@FM
DataFields := "RANGE"   	:@VM:SQL_Format(Rec(ASM_PART_RANGE$),        "INT"):@FM
DataFields := "FLOW"		:@VM:SQL_Format(Rec(ASM_PART_FLOW$),         "STR"):@FM
DataFields := "GAS" 		:@VM:SQL_Format(Rec(ASM_PART_GAS$),          "STR"):@FM
DataFields := "INLET_PRESS" :@VM:SQL_Format(Rec(ASM_PART_INLET_PRESS$),  "STR"):@FM
DataFields := "OUTLET_PRESS":@VM:SQL_Format(Rec(ASM_PART_OUTLET_PRESS$), "STR")

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

Return Ans
