Create a structure data type for DB access. The structure members must satisfy the following
conditions.
Member names are the same as corresponding column name of the table to access.
Members’ data types match the data type of corresponding column of the table to access.
Initial Processing
1-1. Write a DB_ControlService (Control DB Connection Service) instruction.
(This instruction is not required if you set the DB Connection Service to auto start in the DB
Connection Settings.)
1-2. Write a DB_Connect (Establish DB Connection) instruction.
1-3. Write a DB_CreateMapping (Create DB Map) instruction.
The DB Map Variable is mapped with the columns of the table to access and registered as
a variable subject to the record processing.
2. Processing during Operation
*1
2-1. Write DB_Insert (Insert DB Record), DB_Update (Update DB Record), DB_Select
(Retrieve DB Record), and other instructions.
3. End Processing
3-1. Write a DB_Close (Close DB Connection) instruction.
4. Power OFF Processing
*2
4-1. Write a DB_Shutdown (Shutdown DB Connection Service) instruction.
*1 When you continuously execute DB_Insert (Insert DB Record), DB_Update (Update DB
Record), DB_Select (Retrieve DB Record), and other instructions, repeat the 2. Processing
during Operation.
*2 Be sure to execute a DB_Shutdown (Shutdown DB Connection Service) instruction before
you turn OFF the power supply to the system. If the power supply is turned OFF without
executing a DB_Shutdown (Shutdown DB Connection Service) instruction, the Operation
Log file may be corrupted or its contents may be lost.