Compile function Delete_ORDER_CHANGE_Record_From_SQL(Connection, Key, Record)

/*****************************************************************************\
	Deletes the given ORDER_CHANGE 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 = "OC_NO":@VM:SQL_Format(Key, "INT")

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

!! Delete records from MV tables first !!

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

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

Return Ans
