摘要 |
Provided is a technique enables programming, including that for database operations, without describing a SQL used to operate the database. A PLC (30) that can access a DBMS (22) stores a user program (38) and definition information (32), the user program (38) including a structure type of variable, the definition information (32) indicating a definition of the structure type. The sequence command program (34) sequentially executes instructions in the user program (38) and invokes a DB access process program (35) in order to access the DBMS (22). The DB access process program (35) reads the definition information (32) and, on the basis of the read definition information (32), generates a SQL statement to be used when access to the DBMS (22) is made by execution of the user program (38). The DB access process program (35) executes the generated SQL statement by transmitting the SQL statement to the DB server (20). |