Compile function Copy_REACT_PROB_CAT_Record_To_SQL(Connection, Key, Record)

/*****************************************************************************\
	Copies the given REACT_PROB_CAT record to the MSSQL database.
	
	History
	-------
	08/09/2010    KRF   Original Programmer
\*****************************************************************************/

$insert REACT_PROB_CAT_EQUATES

Declare function SQL_Write, SQL_Format
Ans = ""

// Parse record into a dimensioned array for speed
Dim Rec(4)
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_PROBLEM_CATEGORY":@VM:SQL_Format(Rec(REACT_PROB_CAT_REACTOR_PROBLEM_CATEGORY$), "STR"):@FM
DataFields := "ENTRY_ID"                :@VM:SQL_Format(Rec(REACT_PROB_CAT_ENTRY_ID$),                 "STR"):@FM
DataFields := "ENTRY_DATE"              :@VM:SQL_Format(Rec(REACT_PROB_CAT_ENTRY_DATE$),               "DATE")

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

Return Ans
