the DB Map Variable is STRING[11], this instruction can retrieve only up to 11 characters, but will be
normally ended.
When the error code is 300B hex (SQL Execution Error), you can get the detailed information of the SQL
Execution Error by executing a DB_GetConnectionStatus instruction.
The measurement error of timeout is +50 ms for a 100-column record when the percentage of task execution
time is 50% as a guide. However, the measurement error varies according to the percentage of task execution
time and the number of columns.
When two or more DB Connection Instructions are executed for a DB Connection at the same time, the DB
Connection Service executes the instructions one by one. The measurement of timeout for the second and
later instructions is started when the instruction is executed by the DB Connection Service, not when the
Execute input variable is changed to TRUE. Therefore, the time from when the Execute input variable is
changed to TRUE to when the timeout occurs for the instruction is longer than the time set for the timeout.
An error occurs for this instruction in the following cases. Error will be TRUE.
When the instruction was executed when the DB Connection Service was not running
When the instruction was executed while the initialization processing of the DB Connection Service
was in progress
When the instruction was executed while the DB Connection Service was stopped due to an error
When the instruction was executed after the DB Connection Service was shut down or while the DB
Connection Service was being shut down
When the value of the DBConnection input variable is invalid or the specified DB Connection is
already closed
When the value of the Timeout input variable is outside the valid range
When the variable specified in the MapVar in-out variable has not been mapped by a
DB_CreateMapping instruction.
When the executed SQL statement resulted in an error in the DB
When the data types cannot be converted between NJ/NX-series Controllers and database
When the DB Connection Service cannot communicate with the DB due to a network failure or other
causes
When one or more SQL statements are already stored in the Spool memory
When the instruction was not completed within the time specified in the TimeOut input variable
When the instruction was executed before completion of the DB’s processing for the DB Connection
Instruction Execution Timeout that occurred for the previous DB_Insert, DB_Update, DB_Select, or
DB_Delete instruction
When more than 32 DB Connection Instructions were executed at the same time
Sample Programming
Refer to the sample programming that is provided for the DB_Delete instruction.