3 Programming the DB Connection Function
3-24
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
3-5-3 DB Connection Instruction Set
Connects to a specified DB.
DB_Close Close DB
Connection
Closes the connection with the DB
established by a DB_Connect
(Establish DB Connection)
DB_CreateMapping Create DB Map Creates a mapping from a DB Map
Variable to a table of a DB.
DB_Insert Insert DB Record Inserts values of a DB Map Variable
to a table of the connected DB as a
DB_Update Update DB Record Updates the values of a record of a
table with the values of a DB Map
DB_Select Retrieve DB
Record
Retrieves records from a table to a
DB Map Variable.
DB_Delete Delete DB Record Deletes the records that match the
conditions from a specified table.
DB_ControlService Control DB
Connection Service
Starts/stops the DB Connection
Service or starts/finishes recording to
DB_GetServiceStatus Get DB Connection
Gets the current status of the DB
DB_GetConnectionStatus Get DB Connection
Gets the status of a DB Connection.
DB_ControlSpool Resend/Clear
Spool Data
Resends or clears the SQL
statements spooled by DB_Insert
(Insert DB Record) and DB_Update
(Update DB Record) instructions.
DB_PutLog Record Operation
Puts a user-specified record into the
Execution Log or Debug Log.
Shuts down the DB Connection
* 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.
Refer to Appendix DB Connection Instructions for details and sample programming of each
instruction.