Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
Java Database Connectivity Drivers
Java Database Connectivity
Java Database Connectivity [JDBC] is the Java method for implementing database independent and platform independent database connectivity. Java defines a programming interface for interacting with an SQL database. Database vendors provide Java objects (usually in the form of a .jar file) that implement the programming interface on top of their databases. The collection of these objects is referred to as a Driver. These drivers are loaded by Java and then connections to the database can be made.
The Database package is built on top of JDBC; therefore to use Database, a JDBC driver must be available. Most database vendors provide JDBC drivers by either shipping them with the database software or providing downloads from their Web site. If vendor-supplied JDBC Drivers are unavailable (or are poorly implemented) there are third party JDBC drivers available as well (both commercial and otherwise).
Before trying to run Database, you must know three pieces of information about the JDBC Driver.
The location of the JDBC Driver (usually in the form of a .jar file). This needs be specified in the call to LoadDriver or added to the CLASSPATH environment variable. This is required so the Driver can be loaded.
The fully qualified package name of the Driver class (for example, com.mysql.jdbc3.Driver or org.postgresql.Driver). This is generally available in the JDBC Driver's documentation. Database does know some common JDBC Driver names; however, if it does not know the particular Driver in use or in case of conflict between installed drivers, this can be passed into LoadDriver.
The URL used to specify a database connection. This is used by OpenConnection. The URL must be of the form "jdbc:subprot:dblocation". subprot is a JDBC Driver specific sub-protocol and dblocation specifies the location of the database. The correct format for subprot and dblocation depends on the JDBC Driver, and is generally available in its documentation.
For a list of known issues and workarounds for various databases and JDBC drivers, see the issues page.
Examples
Load a JDBC driver by specifying the driver and classpath.
Open a different driver.
Open a connection using the first driver. Notice the sub-protocol name and database location.
Open another connection using the second driver.
See Also
Database, Database[compatibility], Database[Driver], Database[Driver][OpenConnection], Database[issues], Database[LoadDriver], Database[usage]
Download Help Document