Compile function Delete_REACT_MODE_Record_From_SQL(Connection, Key, Record)

/*****************************************************************************\
	Deletes the given REACT_MODE record from the MSSQL database.
	
	History
	-------
	09/21/2010    KRF   Original Programmer
\*****************************************************************************/

Declare function SQL_Delete, SQL_Format
Ans = ""
				    
// List of key names and their values
Keys  = "REACT_NO" :@VM:SQL_Format(Field(Key, "*", 1), "INT"):@FM
Keys := "START_DTM":@VM:SQL_Format(Field(Key, "*", 2), "DATETIME")

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

!! Delete records from MV tables first !!
 
// REACT_MODE_SERV_INFO
If Ans EQ "" then
    Ans = SQL_Delete(Connection, "REACT_MODE_SERV_INFO", Keys)
end

// REACT_MODE_NON_PROD_DT
If Ans EQ "" then
    Ans = SQL_Delete(Connection, "REACT_MODE_NON_PROD_DT", Keys)
end

// REACT_MODE
If Ans EQ "" then
    Ans = SQL_Delete(Connection, "REACT_MODE", Keys)
end

Return Ans
