Compile function Delete_PROD_VER_Record_From_SQL(Connection, Key, Record)

/*****************************************************************************\
	Deletes the given PROD_VER record from the MSSQL database.
	
	History
	-------
	04/24/2012    KRF   Original Programmer
\*****************************************************************************/

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

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

!! Delete records from MV tables first !!

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

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

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

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

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

Return Ans
