DB_Insert (Insert DB Record) or DB_Update (Update DB Record) Instruction
If the Spool function is enabled, the SQL statement to send is spooled.
Regardless of the Resend spool data setting, the spooled SQL statement is sent after the
response to the previous DB Connection Instruction is returned.
DB_Select (Retrieve DB Record) or DB_Delete (Delete DB Record) Instruction
To execute the DB_Select (Retrieve DB Record) or DB_Delete (Delete DB Record) instruction
after the response to the previous DB Connection Instruction is returned, write the user program
so that the execution of the DB_Select (Retrieve DB Record) or DB_Delete (Delete DB Record)
instruction is retried until it is normally completed.
Precautions for Correct Use
If the time set in the Query execution timeout parameter has elapsed after execution of a
DB Connection Instruction, a cancel request of the applicable SQL operation is sent to the
DB. The details of the SQL operation cancel processing are given below.
(1) When the cancel processing is completed within 10 seconds*:
The instruction will be terminated due to an error (SQL Execution Error).
(2) When the cancel processing is not completed within 10 seconds*:
A communications timeout will occur. When the communications timeout has
occurred, the instruction will be terminated due to an error (DB Connection
Disconnected Error Status) and the DB Connection is changed to the Disconnected
status.
In the case of DB_Insert (Insert DB Record) or DB_Update (Update DB Record)
instruction, the SQL statement is stored in the Spool memory.
If resending of Spool data and disconnection of DB Connection occur repeatedly,
increase the time set in the Query execution timeout parameter or review the SQL
operation to make an adjustment so that the communications timeout does not occur.
Refer to 5-5 Timeout Monitoring Functions for timeout monitoring.
* The time differs by the DB type and DB status.