| 1 | <small><b>Description</b></small> |
| 4 | To define a data sourcessource, add its properties to the property <tt>sources</tt> is assigned a comma-separated list of names (certainly, `db.properties` file prefixed with the list can contain only one element):data source name: |
| 6 | <tt>sources = <i>dataSourceName</i></tt> dataSourceName.url |
| 7 | dataSourceName.driver |
| 8 | dataSourceName.user |
| 9 | dataSourceName.password |
| 8 | In consequence the following properties of the data source(s) must be set:**Example** |
| 10 | <tt><i>dataSourceName</i> mysql.urlurl = jdbc:mysql://localhost/dbname |
| 11 | <i>dataSourceName</i> mySql.driverdriver = com.mysql.jdbc.Driver |
| 12 | <i>dataSourceName</i> mySql.useruser = username |
| 13 | <i>dataSourceName</i> mySql.password</tt>password = secretPassword |
| 12 | <small><b>Example</b></small> oracle.url = jdbc:oracle://db.domain.com/oracle |
| 13 | <tt>sources = mySqlDB, oracleDB, hsqlDB oracle.driver = oracle.jdbc.driver.OracleDriver |
| 14 | oracle.user = username2 |
| 15 | oracle.password = secretPassword2 |
| 14 | mySqlDB hsql.url = jdbc:mysql://db.domain.com/mysqljdbc:hsqldb:dbData |
| 15 | mySqlDB hsql.driver driver= org.gjthsqldb.mm.mysql.DriverjdbcDriver |
| 16 | mySqlDB hsql.user user= usernamesa |
| 17 | mySqlDB hsql.password password= |
| 16 | oracleDB.url =Additional properties are ignored by Helma but forwarded to the relational database as connection properties, jdbc:oracle://dbso you may set properties specific to the databse product you're using. |
| 17 | oracleDB.driver = oracle.jdbc.driver.OracleDriver |
| 18 | oracleDB.user = username2 |
| 19 | oracleDB.password = secretPassword2 |
| 18 | hsqlDB mysql.url = jdbc:hsqldb:dbDatajdbc:mysql://db.domain.com/mysql |
| 19 | hsqlDB mysql.driverdriver =org com.hsqldbmysql.jdbcDriverjdbc.Driver |
| 20 | hsqlDB mysql.useruser =sa username |
| 21 | hsqlDB mysql.passwordpassword =</tt> secretPassword |
| 22 | mysql.zeroDateTimeBehavior = convertToNull |
| 23 | mySql.useUnicode=true |
| 24 | mySql.characterEncoding=UTF-8 |
| 20 | Additional properties are ignored by Helma but forwarded to the relational database as connection properties. |
| 21 | |
| 22 | <small><b>Example</b> (see http://bugs.mysql.com/bug.php?id=7369)</small> |
| 23 | <tt>sources = mySqlDB |
| 24 | |
| 25 | mySqlDB.url = jdbc:mysql://db.domain.com/mysql |
| 26 | mySqlDB.driver = org.gjt.mm.mysql.Driver |
| 27 | mySqlDB.user = username |
| 28 | mySqlDB.password = secretPassword |
| 29 | mySqlDB.zeroDateTimeBehavior = convertToNull</tt> |
| 30 | |
| 31 | |
| 32 | <small><b>Note:</b></small> |
| 33 | It's possible to set further configuration values in the db.properties as for example: |
| 34 | |
| 35 | <tt>mySqlDB.useUnicode=true |
| 36 | mySqlDB.characterEncoding=UTF-8</tt> |
| 37 | |
| 22 | * <a href="http://grazia.helma.org/pipermail/helma-user/2004-August/002723.html"> example >example on the mailing list</a> |
| 23 | * <a href="http://help.antville.org/stories/811460/#816656">about charset handling with antville</a> |
| 24 | * <a href="http://bugs.mysql.com/bug.php?id=7369">Zero date problem in MySQL</a> |