53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
Compile function Delete_RECIPE_Record_From_SQL(Connection, Key, Record)
|
|
|
|
/*****************************************************************************\
|
|
Deletes the given RECIPE 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 = "SEQ":@VM:SQL_Format(Key, "INT")
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
// Multi-valued Fields
|
|
|
|
!! Delete records from MV tables first !!
|
|
|
|
// RECIPE_RMOD
|
|
If Ans EQ "" then
|
|
Ans = SQL_Delete(Connection, "RECIPE_RMOD", Keys)
|
|
end
|
|
|
|
// RECIPE_REACTOR
|
|
If Ans EQ "" then
|
|
Ans = SQL_Delete(Connection, "RECIPE_REACTOR", Keys)
|
|
end
|
|
|
|
// RECIPE_MODIFY
|
|
If Ans EQ "" then
|
|
Ans = SQL_Delete(Connection, "RECIPE_MODIFY", Keys)
|
|
end
|
|
|
|
// RECIPE_LAYER
|
|
If Ans EQ "" then
|
|
Ans = SQL_Delete(Connection, "RECIPE_LAYER", Keys)
|
|
end
|
|
|
|
// RECIPE_LIMIT
|
|
If Ans EQ "" then
|
|
Ans = SQL_Delete(Connection, "RECIPE_LIMIT", Keys)
|
|
end
|
|
|
|
// RECIPE
|
|
If Ans EQ "" then
|
|
Ans = SQL_Delete(Connection, "RECIPE", Keys)
|
|
end
|
|
|
|
Return Ans
|