Industrial Automation
Industrial Automation | Europe


Main > Product Type > Software > Visualisation
Minimize Text   Default    Enlarge Text


Database Connection To SQL Database - CX-Supervisor

Both computers must be installed with MySQL. Configuration of the local SQL Server, see above. To get from one machine to the computer with the Database the hostname or IP address must be known. Furthermore you need the username and password of the data bank on which you want access (if it is not root). To connect to MySQL start up and go to Connect. In this window, you can set the parameters for the new connection
A. Connection name, host / IP = IP address (eg
User = username or root, password = if needed and the database which one wants to read. After the entries has been made these are stored, and then connect to the server.

Creating a dsn file
The dsn file contains the connection data to the SQL database.
Settings \ Administration \ ODBC sources, the database contains a dsn file allocated on which the data is realized. For the dsn file tab and select the ODBC driver (MYSqlODBC) and a file name. This applies only to the MySQL ODBC driver Version 3.51. With another driver, it is difficult to create a dsn file.

Creating a database
When starting MySqlFront must be connected with the SQL Server and the data base. If another user name other than "root" is given then use this, same applies for the password. If you have a successful connection - create the front end with MYSQL database. Table, fields and set the datatypes of the fields. Set the structure of the database.

Open the editor on the job (Workspace) tab and select Database add a link (right mouse button). Choose the dsn path (it is located C: \ Program Files \ Common Files \ ODBC \ Data Source).
After the connection, you can assign variables to the record and the fields.
Append records to enable a second row with the same structure to be created. Only the fields with the property ADD will get the variables assigned in the record to be written.
To work properly, the database and dataset (recordset) must always be specified in SQL in the DB commands.

The current record number read through Supervisor taken from the SQL database,  is always 1 higher than the actual data displayed. A better method is currentPage, which agrees with the database entries match.
The same applies to 'next record' wherein the Next pointer jumps 2 rows further, not to NextPage or Previous, PreviousPage.  Headings are not supported with the SQL database. To learn what functions of the database are used 'dbsupport'.
The returned function is either 1  supported or 0 is not supported.
The Record function change does not alter the currently displayed but the next record. When you append data to the SQL database the sorting appears illogical. In my example were all appended records are 5sec the Counter 1 indicates the current number. In the Access database they are all in ascending order, with the SQL records less than 700 descending order and then the rest in ascending order.

Page 2 of 7
Previous Next


Akon_Database.pag - Size: 40448
DAS_AnlagenDB.pag - Size: 112640
database.mdb - Size: 679936
daten_sql.frm - Size: 8902
daten_sql.MYD - Size: 104424
daten_sql.MYI - Size: 1024
Datenaustausch.dsn - Size: 127
Datenbank_Seite.pag - Size: 102400
DATENBANK_SQL.SR2 - Size: 302080
DB_SQL_mit_Supervisor.ppt - Size: 223744
DATENBANK_SQL.rec - Size: 2
Doku_Datenbank.xls - Size: 20992
Test_Access.mdb - Size: 1277952

Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2009-06-16
Modified 2009-06-18
Views 19


You are not logged in.