Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
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