Compile function Delete_RDS_Record_From_SQL(Connection, Key)

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

Declare function SQL_Delete, SQL_Format
Ans = ""
 
// List of key names and their values
Keys = "SEQ":@VM:SQL_Format(Key, "INT")

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

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

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

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

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

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

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

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

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

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

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

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

Return Ans
