1.SQL Access Manager?
SQL Access Manager is used to establish the relationship between database columns and KingView variables. It includes two functions: form template and record body. Create tables in database tables through table templates; establish connections between database table columns and KingView through record bodies, allowing KingView to directly manipulate data in the database through record bodies. Table templates and record bodies are created in the project browser. ?
2. Create a table template?
Select the "Table Template" item under "SQL Access Manager" in the project directory display area on the left in the project browser. Double-click "New" in the side directory content display area, and the "Create Table Template" dialog box will pop up, as shown below.
3. The purpose of creating a table template is to define a format. SQLCreatTable() will be used later to create a table in the Access database in this format.
4. Create a record body?
Select the "Record Body" item under "SQL Access Manager" in the project directory display area on the left in the project browser, and on the right Double-click "New" in the directory content display area, and the "Create Record Body" dialog box will pop up, as shown below.
5. Where:?
The field name fills in the column name in the database table. ?
KingView variable fills in the KingView variable associated with the specified column in the table. ?
6. Create Ms Access database?
1. Create an empty Access file and name it. ?
2. Define the data source. Double-click the "ODBC Data Source (32-bit)" option under the control panel to pop up the "ODBC Data Source Manager" dialog box. Select the "User DSN" property page and click the "Add" button.
7. In the pop-up "Create New Data Source" dialog box, select "Mirosoft Access Driver" and click the "Finish" button. ?
The "ODBC Microsoft Access Installation" dialog box pops up and defines the data source name.
8. Click the "Select" button and select the database file just defined under the corresponding path. Click the "OK" button to complete the configuration of the data source. ?
9. Operation on the database?
First, create the variable DeviceID in the data dictionary, which is a memory shaping and is the connection number generated when the database is connected. In this way, the data of the access database can be read.