try { Class.forName("com.internetcds.jdbc.tds.Driver"); Connection con = DriverManager.getConnection( "jdbc:freetds:sqlserver://Lampoon/Registration", "sa", " s3m1c0nduct0r"); System.out.println("got connection"); Statement s = con.createStatement(); String sql = "INSERT INTO UserReg VALUES ('a', 'b', '12/12/2001', 'f')"; s.executeUpdate(sql); sql = "SELECT FirstName, LastName FROM Users"; ResultSet rs = s.executeQuery(sql); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getString(2)); } rs.close(); s.close(); con.close(); } catch (ClassNotFoundException e1) { System.out.println(e1.toString()); } catch (SQLException e2) { System.out.println(e2.toString()); } catch (Exception e3) { System.out.println(e3.toString()); }