• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)

JDBC

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

May 3, 2014 //  by Krishna Srinivasan//  Leave a Comment

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 explicitly call the commit method. If you call the connection.commit() method, then the below exception will be thrown. …

Category: JavaTag: Java Exceptions, JDBC

Connect To MySQL With JDBC Driver

November 11, 2013 //  by Krishna Srinivasan//  Leave a Comment

Here is an example to connect your JDBC code to MySQl database. You have to download mysql.jar for the JDBC driver class from here. [code] Class.forName("com.mysql.jdbc.Driver"); Connection conn = null; conn = DriverManager.getConnection("jdbc:mysql://hostname:port/dbname","username", "password"); conn.close(); [/code]   [code lang=”java”] package javabeat.net.db; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class MySQLConnectionExample { public static void main(String[] …

Category: MYSQLTag: JDBC, MySQL

New features in JDBC 3.0

June 18, 2012 //  by Krishna Srinivasan//  Leave a Comment

This article provides an introduction to the array of core new features available in JDBC 3.0. More specifically, the features ‘supporting save points’, ‘using parameter metadata’, ‘updating large objects’ and ‘auto generated keys’ are discussed. Wherever possible, to get a hang of it, relevant code samples have been provided in the respective sections. Download Source …

Category: JavaTag: JDBC, JDBC 3.0

JDBC Interview Questions

February 13, 2009 //  by Krishna Srinivasan//  Leave a Comment

1) I have the choice of manipulating database data using a byte[] or a java.sql.Blob. Which has best performance? java.sql.Blob, since it does not extract any data from the database until you explicitly ask it to. The Java platform 2 type Blob wraps a database locator (which is essentially a pointer to byte). That pointer …

Category: Interview QuestionsTag: JDBC

JDBC connection in JDeveloper with MySQL database

November 25, 2008 //  by Krishna Srinivasan//  Leave a Comment

The Java Database Connectivity (JDBC) API is used to access a SQL database from a Java application. JDBC also supports tabular data sources, such as a spreadsheet. Oracle JDeveloper is a free Integrated Development Environment (IDE) for modeling, developing, debugging, optimizing, and deploying Java applications. JDeveloper 10g is used to develop J2EE applications comprising the JSPs, …

Category: JavaTag: JDBC, JDeveloper, MySQL

JDBC 4.0 API in Java 6.0

June 7, 2007 //  by Krishna Srinivasan//  Leave a Comment

1) Introduction Java Database Connectivity allows Application Programs to interact with the Database to access the Relational Data. JDBC provides the Pluggable Architecture wherein any type of Java Compliant Drivers can be plugged-in even during the run-time. The JDBC API provides functionality to establish Connection to the back-end Database session which can execute the Queries …

Category: JavaTag: Java 6.0, JDBC, JDBC 4.0

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

np.zeros

A Complete Guide To NumPy Functions in Python For Beginners

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Introductiion to Jakarta Struts

What’s new in Struts 2.0? – Struts 2.0 Framework

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact