Category: Java

Java: Connecting to MySQL Database using Thin Driver

Java: Connecting to MySQL Database using Thin Driver To connect a Java application with MySQL database using Thin Driver. You need to follow the following steps Load Driver Class: The Driver Class for MySQL database is com.mysql.jdbc.Driver and Class.forName(“com.mysql.jdbc.Driver”) method is used to load the driver class for MySQL database. Create Connection: For creating a connection you will need a Connection […]

Java: Connecting to Oracle Database using Thin Driver

Java: Connecting to Oracle Database using Thin Driver To connect a Java application with Oracle database using Thin Driver. You need to follow the following steps Load Driver Class: The Driver Class for oracle database is oracle.jdbc.driver.OracleDriver and Class.forName(“oracle.jdbc.driver.OracleDriver”) method is used to load the driver class for Oracle database. Create Connection: For creating a connection you will need a Connection […]

Connecting to Access Database using JDBC Type-1 Driver

Connecting to Access Database using JDBC Type-1 Driver To connect a Java application with Access database using JDBC-ODBC Bridge(type-1) Driver. You need to follow the following steps Create DSN Name Go to control panel Go to Administrative tools Select Data Source(ODBC) Add new DSN name, select add Select Access driver from the list, click on […]

Steps to connect a Java Application to Database

Steps to connect a Java Application to Database The following 5 steps are the basic steps involve in connecting a Java application with Database using JDBC. Register the Driver Create a Connection Create SQL Statement Execute SQL Statement Closing the connection Register the Driver Class.forName() is used to load the driver class explicitly. Example to register […]

JDBC 4.0 API

JDBC 4.0 API JDBC 4.0 API is mainly divided into two package java.sql javax.sql java.sql package This package include classes and interface to perform almost all JDBC operation such as creating and executing SQL Queries. Important classes and interface of java.sql package classes/interface Description java.sql.BLOB Provide support for BLOB(Binary Large Object) SQL type. java.sql.Connection creates a connection […]

Back To Top