Difference between revisions of "Base/connectivity/Derby"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Connecting via JDBC)
Line 1: Line 1:
 
== Connecting via JDBC ==
 
== Connecting via JDBC ==
  
Derby has two JDBC-Driver. The Embedded Driver called "org.apache.derby.jdbc.EmbeddedDriver" and the "org.apache.derby.jdbc.ClientDriver". The first Driver embedded the Derby Database Driver into Java Code. The second Driver connect the Derby Database via network.
+
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'''
 
'''1.) Embedded'''
DataBase URL:        jdbc:derby:C:\Dokumente und Einstellungen\db-derby-10.5.3.0\bin\DB-TABLE;
+
DataBase URL:        '''jdbc:derby:C:\Dokumente und Einstellungen\db-derby-10.5.3.0\bin\DB-TABLE'''
JDBC Driver Class:    org.apache.derby.jdbc.EmbeddedDriver
+
JDBC Driver Class:    '''org.apache.derby.jdbc.EmbeddedDriver'''
  
 
'''2.) Network'''
 
'''2.) Network'''
 
Start the Networkserver of Derby. The Default connection is localhost at port 1527
 
Start the Networkserver of Derby. The Default connection is localhost at port 1527
DataBase URL:derby:  jdbc:derby://127.0.0.1:1527/Firsttable;create=true
+
DataBase URL:derby:  '''jdbc:derby://127.0.0.1:1527/Firsttable;create=true'''
JDBC Driver Class:    org.apache.derby.jdbc.ClientDriver
+
JDBC Driver Class:    '''org.apache.derby.jdbc.ClientDriver'''
  
  
Importend, if you want to use the Derby Tool ij, name of tables only in upper cases 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.
+
 
 +
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.
  
 
[[Category:Database]]
 
[[Category:Database]]

Revision as of 01:45, 31 January 2013

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-10.5.3.0\bin\DB-TABLE JDBC Driver Class: org.apache.derby.jdbc.EmbeddedDriver

2.) Network Start the Networkserver of Derby. The Default connection is localhost at port 1527 DataBase URL:derby: jdbc:derby://127.0.0.1:1527/Firsttable;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