Compile function Copy_SURF_SCAN_TOOL_Record_To_SQL(Connection, Key, Record)

/*****************************************************************************\
	Copies the given SURF_SCAN_TOOL record to the MSSQL database.
	
	History
	-------
	06/28/2010    KRF   Original Programmer
	04/21/2012    KRF   Dropped per David's Request, SQL_MFS Removed so this
	                    won't be called
\*****************************************************************************/

Declare function SQL_Write, SQL_Write_MV, SQL_Format
Ans = ""

// Parse record into a dimensioned array for speed
Dim Rec(3)
MatParse Record into Rec
					    
// List of key names and their values
Keys = "TOOL_ID":@VM:SQL_Format(Key, "STR")

// List of data fields and their values
DataFields  = "TOOL_DESC":@VM:SQL_Format(Rec(1), "STR")

// Write the data to the SQL database
Ans = SQL_Write(Connection, "SURF_SCAN_TOOL", Keys, DataFields)

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

// SURF_SCAN_TOOL_RECIPE
If Ans EQ "" AND Rec(2) NE "" then
    
    // List of data fields and their values
    MvFields  = "RECIPE":@FM:SQL_Format(Rec(2), "STR")
    
    // Write the data to the SQL database
    Ans = SQL_Write_MV(Connection, "SURF_SCAN_TOOL_RECIPE", Keys, MvFields);
    
end

Return Ans
