From Apache OpenOffice Wiki
Jump to: navigation, search

Connecting via JDBC

Derby has two JDBC drivers. The Embedded Driver called "org.apache.derby.jdbc.EmbeddedDriver" and the Client-side driver called "org.apache.derby.jdbc.ClientDriver". The first Driver embeds the Derby Database Driver into Java Code. The second Driver connects the Derby Database via network.

1.) Embedded

  • DataBase URL: jdbc:derby:C:\Dokumente und Einstellungen\db-derby-\bin\DB-TABLE
  • JDBC Driver Class: org.apache.derby.jdbc.EmbeddedDriver

2.) Network

  • Start the Network server of Derby. The Default connection is localhost at port 1527
  • DataBase URL:derby: jdbc:derby://;create=true
  • JDBC Driver Class: org.apache.derby.jdbc.ClientDriver

Important: if you want to use the Derby Tool ij, only upper case table names are accepted. It is possible to create tables. It is not possible to insert new records via forms and table data views. But you can use SQL-Statements to insert values into tables.

Personal tools