Wiki source code of Database drivers


Show last authors
1 {{figure image="database_driver_en.png"}}
2 The error message appears when no database drivers are installed. You need to install the appropriate database driver for your database management system.
3 {{/figure}}
4
5 {{formcycle/}} does not ship with any database driver anymore. This allows you to use different drivers and driver versions. However, you must first install the appropriate driver for the database management system you are using. The driver are available from the official page of the respective database management system:
6
7 * [[Oracle MySQL>>https://dev.mysql.com/downloads/connector/j/||rel="noopener noreferrer" target="_blank"]] (Platform Independent must be selected under Select Opterating System)
8 * [[OracleDB>>http://www.oracle.com/technetwork/database/application-development/jdbc/downloads/index.html||rel="noopener noreferrer" target="_blank"]]
9 * [[PostgreSQL>>https://jdbc.postgresql.org/download.html||rel="noopener noreferrer" target="_blank"]]
10 * [[SQLServer>>https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server?view=sql-server-2017||rel="noopener noreferrer" target="_blank"]]
11 * [[MariaDB>>https://mariadb.com/kb/en/library/about-mariadb-connector-j||rel="noopener noreferrer" target="_blank"]]
12
13 The installation procedure depends on the application server you are using. You can find instructions for Apache Tomcat [[here>>doc:Formcycle.SystemSettings.TomcatSettings.InstallDBDriver]].
14
15 == Collation / Encoding ==
16
17 A database lets you choose between different encodings (collation). For {{formcycle/}}, we recommend you use a UTF-8 collation that is case-sensitive. Specifically, we recommend the collation:
18
19 {{code language="none"}}
20 utf8_bin
21 {{/code}}
22
23 When you use a different collations such as //utf8_general_ci// (UTF-8, case insensitive), you may encounter issues as that collation does not distinguish between upper case and lower case letters.
24
25
26 == Notes on MS SQL and Encoding ==
27
28 For the 2019 server version or higher the encoding {{code language="none"}}Latin1_General_100_CI_AS_SC_UTF8{{/code}} should be used. In earlier versions it is best to use the encoding {{code language="none"}}Latin1_General_CI_AS{{/code}}.
29
30 == Notes on Oracle MySQL ==
31
32 {{figure image="database_mysql_unicode_en.png"}}
33 Using Unicode with //Oracle MySQL//. Normally, the database driver recognizes the encoding automatically. In case it does not, you can specify the encoding explicitly.
34 {{/figure}}
35
36 Since version 8, Oracle MySQL does not recognize the timezone name {{smallcaps}}Cest{{/smallcaps}} anymore. By default, the operating system transmit the timezone to the database. When it transmit that timezone name, the database connection cannot be established. In this case, you can specify the timezone explicitly via the {{smallcaps}}Jdbc{{/smallcaps}}-{{smallcaps}}Url{{/smallcaps}}:
37
38 {{code language="text"}}
39 jdbc:mysql://localhost/db?serverTimezone=Europe/London
40 {{/code}}
41
42 Also, there are some circumstances when the character encoding is not recognized correctly. If that happens, you can pass the encoding via {{smallcaps}}Jdbc{{/smallcaps}}-{{smallcaps}}Url{{/smallcaps}} as well. For example, when using Unicode and the database setting //connection collation// was set to //utf8_general_ci//:
43
44 {{code language="text"}}
45 jdbc:mysql://localhost/db?useUnicode=true&characterEncoding=UTF-8
46 {{/code}}
47
48 == Using different database systems ==
49
50 It is also possible to use different database management systems such as HSQLDB, Derby, or Informix. This requires that you installed the corresponding database driver. Here is a list of the {{smallcaps}}Jdbc{{/smallcaps}}-{{smallcaps}}Url{{/smallcaps}} and driver class for some database management systems:
51
52 {{table dataTypeAlpha="0-2" preSort="0-asc"}}
53 |=Name|=JDBC-URL|=JDBC-driver class
54 | SAP HANA| jdbc:sap:~/~/<dbhost>:30015/| com.sap.db.jdbc.Driver
55 | Informix| jdbc:informix-sqli:~/~/<dbhost>:9088/sysuser:INFORMIXSERVER=hpjp|com.informix.jdbc.IfxDriver
56 | HSQLDB| jdbc:hsqldb:mem:<dbname>| org.hsqldb.jdbc.JDBCDriver
57 | Derby| jdbc:derby:target/tmp/derby/hpjp;databaseName=<dbname>;create=true| org.apache.derby.jdbc.EmbeddedDriver
58 {{/table}}