Compile function Copy_TW_PRIME_USAGE_Record_To_SQL(Connection, Key, Record)

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

Declare function SQL_Write, SQL_Format
Ans = ""

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

// List of data fields and their values
DataFields  = "REACTOR"    :@VM:SQL_Format(Rec(1), "INT"):@FM
DataFields := "TW_CNT"     :@VM:SQL_Format(Rec(2), "INT"):@FM
DataFields := "TW_CODE_ID" :@VM:SQL_Format(Rec(3), "INT"):@FM
DataFields := "ENTRY_ID"   :@VM:SQL_Format(Rec(4), "STR"):@FM
DataFields := "ENTRY_DATE" :@VM:SQL_Format(Rec(5), "DATE"):@FM
DataFields := "TYPE"       :@VM:SQL_Format(Rec(6), "STR"):@FM
DataFields := "DESC_OF_USE":@VM:SQL_Format(Rec(7), "STR", 1):@FM
DataFields := "ORIENTATION":@VM:SQL_Format(Rec(8), "INT"):@FM
DataFields := "WAFER_SIZE" :@VM:SQL_Format(Rec(9), "STR")

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

Return Ans
