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}}
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:
7 * [[Oracle MySQL>>||rel="noopener noreferrer" target="_blank"]] (Platform Independent must be selected under Select Opterating System)
8 * [[OracleDB>>||rel="noopener noreferrer" target="_blank"]]
9 * [[PostgreSQL>>||rel="noopener noreferrer" target="_blank"]]
10 * [[SQLServer>>||rel="noopener noreferrer" target="_blank"]]
11 * [[MariaDB>>||rel="noopener noreferrer" target="_blank"]]
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]].
15 == Collation / Encoding ==
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:
19 {{code language="none"}}
20 utf8_bin
21 {{/code}}
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.
26 == Notes on MS SQL and Encoding ==
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}}.
30 == Notes on Oracle MySQL ==
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}}
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}}:
38 {{code language="text"}}
39 jdbc:mysql://localhost/db?serverTimezone=Europe/London
40 {{/code}}
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//:
44 {{code language="text"}}
45 jdbc:mysql://localhost/db?useUnicode=true&characterEncoding=UTF-8
46 {{/code}}
48 == Using different database systems ==
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:
52 {{table dataTypeAlpha="0-2" preSort="0-asc"}}
53 |=Name|=JDBC-URL|=JDBC-driver class
54 | SAP HANA| jdbc:sap:~/~/<dbhost>:30015/|
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}}
Copyright 2000-2023