Compile function Delete_CALIB_LIST_Record_From_SQL(Connection, Key, Record)

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

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

!! Delete records from MV tables first !!

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

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

Return Ans
