Blog Posts - Jdbc



How to solve java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test

The error "java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test" occurs when you try to connect MySQL database running on your localhost, listening on port 3306 port from Java program but either you don't...
by javarevisited on Sep 3, 2016

Why Timestamp cannot be used in place of Date in Java?

One of the tricky question from Java Interview is, "Can we pass a Timestamp instance to a method expecting java.util.Date?", it's a tricky question because the answer is both Yes and No. You can, of course, pass a Timestamp object to a...
by javarevisited on Aug 15, 2016

How to convert java.sql.Date to java.util.Date in Java - JDBC Example

You often need to convert java.sql.Date to java.util.Date while interacting with databases from Java application. Since JDBC the Java API for database connectivity uses java.sql.Date to represent and most of the java code accepts java.util.Date, you...
by javarevisited on Jun 27, 2016

CodeQuiz Online Quiz Application - JSP, Java Servlets, CSS3, MySQL, JDBC, Apache Tomcat

Hello everyone,In this project I have created an online quiz web application system called CodeQuiz that allows programmers to register, login, and solve various programming quizzes to test their knowledge. The system is mainly based on JSPs and Jav...

Company Webmail System Project - Java Servlets, HTML5, CSS3, MySQL, JDBC, Apache Tomcat v8

Hello everyone,In this project I have created a company webmail system that allows employees to register, login, send emails to each other and manage their inboxes. The system is based on HTML and Java Servlets. The following is the registration-logi...

Java Database Integration (JDBC) with MySQL and Swing – Bank Login System Project

Hello everyone,In this project I have created a login page for an imaginary bank called Botbank using Java and MySQL. The user interface of the application is shown below. The green light on the right top corner of the page illustrates the status of...

How to connect to Microsoft SQL Server database using Eclipse

Though I prefer SQL Server Management Studio to access and work with Microsoft SQL Server database, Sometimes, it's better to connect MSSQL database directly from Eclipse. This will save a lot of time which is wasted on switching between two appl...
by javarevisited on Feb 27, 2016

SQL Server JDBC Error: The TCP/IP connection to the host Failed

I had installed SQL SERVER 2014 Express edition and I was trying to connect to SQL SERVER from Java program using JDBC, but I was repeatedly getting following error:com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host lo...
by javarevisited on Oct 9, 2015

java.sql.SQLException: No suitable driver found for jdbc:jtds:sqlserver - Cause and Solution

java.sql.SQLException: No suitable driver found for There are two ways to connect Microsoft SQL Server from Java program, either by using Microsoft's official JDBC driver (sqljdbc4.jar), or by using jTDS driver (jtds.jar). This error comes when...
by javarevisited on Jul 25, 2015

How to solve java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver in Java 8

java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver exception comes in Java 8 because it has removed the JDBC ODBC bridge driver class "sun.jdbc.odbc.jdbcodbcdriver" from JDK and JRE. This class is required to connect any database...
by javarevisited on Jul 12, 2015

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver [Solution]

This error comes when you try to connect to Microsoft SQL Server database from Java program but the required JDBC driver is not available in Classpath or driver is available in CLASSPATH but class loader is not able to find it due classpath intricac...
by javarevisited on Jul 5, 2015

Udemy – Java Database Connection JDBC and MySQL

Description: In this course, you learn how to connect to a MySQL database using Java JDBC. The course starts with an overview of the JDBC API. Then you learn how to set up your development environment with the appropriate MySQL database drivers. Next...
by tutgfx on Apr 7, 2015

The Set of Plausible JDBC Interview Questions

The Set of Plausible JDBC Interview Questions  In case you aspire to have a career of a Java programmer it is important that you get acquainted with the kind of JDBC interview questions. The pattern of the interview is designed in a manner to h...

java.sql.SQLException: Can’t call commit when autocommit=true Exception

Connect to us ( @twitter | @facebook )When you work with JDBC application, by default the auto commit is set to true, after the transaction is completed all the transactions are committed to the database. When it is set as true, you can not explicitl...
by JavaBeat on May 3, 2014

Difference between Connected vs Disconnected RowSet in Java JDBC | RowSetProvider, RowSetFactory Example

RowSet interface is another key interface from JDBC API, which extends the ResultSet interface to provide support for the JavaBean component model. Along with convenient methods to set connection parameters e.g. setUrl(), setUsername(), setPassword()...
by javarevisited on Apr 28, 2014

Jdbc-driver types with examples in Java

Before Discussing in detail about the type of Jdbc-driver  . We need to first understand the meaning of term Driver . So , What is Driver ?The concept is that a Driver should be a one point contact for all interactions between your Java App...
by Java Hungry on Dec 6, 2013

Connecting Java to Mysql Database

In our earlier post we learned about Connecting Java to Microsoft Access.In today’s post we shall learn about connecting Java to Mysql database.For connecting Java to Mysql we need to install Mysql odbc drivers.You can get the drivers from thei...
by letus program on Nov 26, 2013

Connecting Java to Microsoft Access DataBase

Database plays a very important role in maintaining a web site or a organization details.It will be exciting if we are able to use the data present in Database in our program.One of the important features of Java is that we can connect to database us...
by letus program on Nov 23, 2013

Connecting Java to Microsoft Access DataBase…!!!

Database plays a very important role in maintaining a web site or a organization details.It will be exciting if we are able to use the data present in Database in our program.One of the important features of Java is that we can connect to database us...
by letus program on Nov 23, 2013

Advanced JDBC Interview Questions and Answers for freshers and experienced

Advanced JDBC Interview Questions and Answers for freshers and experienced1) What is JDBC?Ans: JDBC stands for Java Database Connectivity.It is a J2EE API that provides cross-Database connectivity to a wide range of SQL databases.With a JDBC technolo...
by apkview on Nov 5, 2013


Trending Topics

Close