Adding a JDBC Driver
See Also
To connect to a database from within the IDE, you must have an appropriate JDBC driver for this database and register this driver with the IDE. Registered drivers (
) are listed under Drivers under the Databases node in the Services window.
The drivers are of the following kind:
- JDBC drivers that are registered and bundled with the NetBeans IDE.
These are drivers for MySQL and PostgreSQL. You can establish a connection to these databases right away, without downloading them separately..
- JDBC drivers that are registered with the IDE by default, but not bundled with the IDE.
These are drivers for Oracle Database and Java DB. For example, the Java DB drivers are located in the Java DB installation directory and NetBeans recognizes them automatically at their default location. As for the drivers for Oracle Database, you need to download them manually from the Oracle website.
If you need another JDBC driver that is different from those mentioned above, you need to manually add it to the IDE.
- Adding a new driver just creates a template for
new connections. The IDE does not actually try to use that driver or check
it to ensure it is correct until a connection is made using the driver.
- You can add the driver directly at the first step when setting up a connection. If you want just to add a driver, without connecting to the database, right-click the Drivers node and choose New Driver.
An uninstalled driver node (
)
is displayed in the Services window if a driver is registered with the IDE but the archive JAR file for the driver is not currently on the IDE's class path.
In this case, you should remove the driver or modify the driver's properties to specify the correct location of the driver JAR file.
To remove a driver:
- Right-click the driver node in the Services window and choose Delete.
To modify driver's properties:
- Right-click the driver's node and choose Customize.
-
See Also
- Connecting to a Database
Legal Notices