omron — Controller NX NJ MySQL SQL 2.0 Quick Start EN 202002 SW 103 (EN)

Add the DB_Connect function block to the first rung of your ladder. Set the DBConnectionName to match the default name generated for the database connection that was created early in this document. Note: The _DBC_Status.Run system variable is set to TRUE when the SQL sub process on the controller is running. Add the DB_Close function block. Note: The variable connected to DBConnection will be used to link the rest of the DB function blocks associated with our DB Connection.