36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
Compile function Copy_WAREHOUSE_Record_To_SQL(Connection, Key, Record)
|
|
|
|
/*****************************************************************************\
|
|
Copies the given WAREHOUSE record to the MSSQL database.
|
|
|
|
History
|
|
-------
|
|
06/29/2010 KRF Original Programmer
|
|
04/21/2012 KRF Dropped per David's Request, SQL_MFS Removed so this
|
|
won't be called
|
|
\*****************************************************************************/
|
|
|
|
$insert WAREHOUSE_EQUATES
|
|
|
|
Declare function SQL_Write, SQL_Write_MV, SQL_Format
|
|
Ans = ""
|
|
|
|
// Parse record into a dimensioned array for speed
|
|
Dim Rec(5)
|
|
MatParse Record into Rec
|
|
|
|
// List of key names and their values
|
|
Keys = "WH_CD":@VM:SQL_Format(Key, "STR")
|
|
|
|
// List of data fields and their values
|
|
DataFields = "[DESC]" :@VM:SQL_Format(Rec(1), "STR"):@FM
|
|
DataFields := "RESP_USER":@VM:SQL_Format(Rec(2), "STR"):@FM
|
|
DataFields := "COMP_LOC" :@VM:SQL_Format(Rec(3), "STR")
|
|
|
|
// Write the data to the SQL database
|
|
Ans = SQL_Write(Connection, "WAREHOUSE", Keys, DataFields)
|
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|
Return Ans
|