Appendix A
A-11
A
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
DB_CreateMapping (Create DB Map)
DB_CreateMapping (Create DB Map)
The DB_CreateMapping instruction creates a mapping from a DB Map Variable to a table of a DB.
DB_CreateMapping Create
DB Map
FB
DB_CreateMapping_instance
(Execute, DBConnection,
TableName, MapVar,
SQLType, Done, Busy, Error,
ErrorID);
Note The DB_CreateMapping_instance is an instance of DB_CreateMapping instruction, which is declared as a variable.
Variables
Input Variables
Execute Execute BOOL TRUE or FALSE --- FALSE Specify the execution
DBConnection DB
Connection
DWORD 16#00000000 to 16#FFFFFFFF --- 16#0000
0000
Specify the DB
connection established
by a DB_Connect
STRING Depends on the data type.* --- '' Specify a table name in
MapVar DB Map
Variable
Structure, Structure
array (entire array)
Depends on the data type. --- --- Specify a structure
variable defined for
SQLType SQL Type _eDBC_SQLTYPE _DBC_SQLTYPE_INSERT(1):
INSERT
_DBC_SQLTYPE_UPDATE(2):
UPDATE
_DBC_SQLTYPE_SELECT(3):
--- 0 Specify a type of SQL
command for the
variable to map.
* When the database is case sensitive, specify the table name as shown below.
When connecting to MySQL, enclose the table name in single-byte backquotes
Example: `TableName1`
When connecting to other databases, enclose the table name in single-byte double quotes.
Example: “TableName1”
Output Variables
--- TRUE when the instruction is normally
Busy Executing BOOL TRUE or
--- TRUE when the instruction is being executed.
DB_CreateMapping
DBConnection
Busy
Execute
Done
Error
ErrorID
MapVar
SQLType
TableName
DB_CreateMapping_instance
DB Connection Instructions