omron — Руководство по подключению к базе данных Sysmac NJ и IBM DB2 (EN)

The next step is to map the NJ Tags to the Database Tables Fields DBConnection: This came from the “DB_Connect Instruction” – unique number identifier for each connection. TableName: This is the name of the Table you want to send data to/from in the SQL server. SQLType: Enter one of the following contants DBC_SQLTYPE_INSERT, DBC_SQLTYPE_SELECT, DBC_SQLTYPE_DELETE, DBC_SQLTYPE_UPDATE. You must enter a unique variable name for “MapVar” even if it is for the same table – or only the last one will work. The MapVar must be of a structure type. Here is an example of an NJ Structure and the SQL table. In this case under Table4 of Database NJEXPRESS you will see Barcode, Qty, and Timestamp.

The SQL_Insert_Type is exactly the same. The member names must match exactly the field names in the SQL database. Page 10 of 21