(ODBC Manager Library)
Description: Builds SQL UPDATE statements using supplied field names and values. Made to be called as a subroutine only.
Returns: Text
Usage: Script
Format: \ODBCManager\BuildUpdate( TableName, UpdateFields, UpdateValues, SQLDataTypes, WhereFields, WhereOperators, WhereValues, WhereSQLDataTypes, WhereAND, dbType)
Parameters: TableName { text } { required } { no default: }
The name of the table to be updated.
UpdateFields { text or array } { required } { no default: }
May be a simple value or a one-dimensional array. Field names to be updated
UpdateValues { text or array } { required } { no default: }
Any SQL data type. May be a simple value or a one-dimensional array. New values for the fields
SQLDataTypes { numeric or array } { required } { no default: }
Values indicating the data type of the update values. Should be a simple value or an array matching the UpdateFields parameter. Refer to Data Type Codes used in the ODBC Manager for a list of the codes.
WhereFields { text or array } { required } { no default: }
Field names for WHERE clause
WhereOperators { text or array } { required } { no default: }
May be a simple value or a one-dimensional array. Operators for WHERE clause
WhereValues { text or array } { required } { no default: }
Text. May be a simple value or a one-dimensional array. Values for WHERE clause
WhereSQLDataTypes { numeric or array} { required } { no default: }
Values indicating the data type of the insert values. Should be a simple value or an array matching the WhereFields parameter. Refer to Data Type Codes used in the ODBC Manager for a list of the codes.
WhereAND { Boolean } { required } { no default: }
Can be any expression that evaluates to a Boolean true or false. If set to true (non-zero) then the components of the WHERE clause are to be ANDed together. If false (0) an OR is used between the sub clauses.
dbType { numeric } { required } { no default: }
Database type, used for conversions of time or date formats. Refer to Database Type Codes used in the ODBC Manager for a list of the possible values.
Returns: Returns the SQL UPDATE statement as a text string
Comments: This module is a member of the ODBCManager Library, and must therefore be prefaced by \ODBCManager\, as shown in "Format" above.
See Also:
BuildInsert | BuildSelect | BuildDelete