Compile function Delete_VISION_LOG_Record_From_SQL(Connection, Key, Record)

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

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

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

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

Return Ans
