JDBC Archive

Database Porgramming : Creating a simple phone book using Java & a database ( HSQLDB )

In one of the last tutorial, we have created a simple phonebook system using a text file and Java Programming. For more details, click here. In this tutorial, we will be creating the same project but with the integration of a simple database management system called ( HSQLDB ). The program will ...Read More

Java & HSQLDB : Connecting to a DBMS (HSQLDB) from Java Program

1) Create a simple file and call it Simple.java. Here is a simple code written in Java to connect to a DBMS : import java.io.*; import java.sql.*; import java.util.*; public class Simple { public static void main(String args) { Connection con=null;; try { Class.forName("org.hsqldb.jdbc.JDBCDriver"); con=DriverManager.getConnection("jdbc:hsqldb:mydbb","SA",""); con.createStatement().executeUpdate("SET DATABASE SQL SYNTAX MYS TRUE"); con.createStatement().executeUpdate("create ...Read More