Compile function Delete_TUBE_Record_From_SQL(Connection, Key, Record)

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

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

!! Delete records from MV tables first !!

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

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

Return Ans
