Database connection settings

<< Click to Display Table of Contents >>

Manual > Appendix >

Database connection settings

Database-compatible actions and DBMS compatibility table

The following link contains a table showing the actions that are supported by the database and the DBMS that can be connected.

 

For details, please refer to "About supported databases".

 

 

hint

The latest information on database-compatible functions, supported database types, versions, etc. can also be found in the FAQ "What database products are supported?" on our website.

 

 

 

Database connection settings (ODBC settings)

First, you need to configure ODBC to connect to the database. The procedure for configuring ODBC is the same for each DBMS.

For information on setting up ODBC, please refer to the description in "ODBC Settings" in the common settings for actions.

 

 

hint

The ODBC driver is available in 32-bit and 64-bit versions. Please select the appropriate version depending on whether the FA-Server version you are using is 32-bit or 64-bit.

 

 

 

Points to note when connecting to PostgreSQL

When using PostgreSQL as your DBMS, please take note of the following:

 

When connecting to a database using PostgreSQL, the tables prepared on the database side are as follows:Table and field names must be defined in lowercase.It is necessary.

 

 

 

Recommended data types for each DBMS

The recommended settings for the data types of fields specified in the table definition on the DBMS side are as follows:

 

Data Type

SQLServer

Oracle

MySQL

PostgreSQL

remarks

date

DATETIME

DATE

DATETIME

TIMESTAMP


String

VARCHAR(n)

VARCHAR2(n)

VARCHAR(n)

VARCHAR(n)


Number (integer)

INT

NUMBER(10, 0)

INT

INTEGER


Numeric (floating point)

FLOAT

BINARY_DOUBLE

DOUBLE

DOUBLE PRECISION


Boolean (if the value is a bit)

TINYINT

NUMBER(1, 0)

TINYINT(1)

SMALLINT

When FALSE, 0 is saved, and when TRUE, 1 is saved.


VARCHAR(5)

VARCHAR2(5)

VARCHAR(5)

VARCHAR(5)

When FALSE is used, the string "FALSE" is saved. When TRUE is used, the string "TRUE" is saved.

This is recommended if you want to save bit tags using the Alarm server save item.

Boolean (if the value is a number)

TINYINT

NUMBER(1, 0)

TINYINT(1)

SMALLINT


 

*For "n" above, specify the maximum number of digits depending on your purpose.

 

Example: VARCHAR(255)

 

 

attention

Please note that table field names cannot use SQL reserved words (for example, "DATE").