Project4 - Date: 4/23/2003 Course: Web Server Programming...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Date: 4/23/2003 Course: Web Server Programming Project #4 As an observation, the project cannot connect to the ORACLE database. Here I include the code. I don’t know if its possible for you to check the project locally on my machine because it is working with MySQL, because there is no other way I can show how it works. DAOBean.java package inventory; import java.io.Serializable; import java.sql.*; public class DAOBean implements Serializable { protected String userName = "luis"; protected String password = ""; protected String url = "jdbc:mysql://localhost:3306/"; protected String driverName = "com.mysql.jdbc.Driver"; protected Connection con = null; protected Statement s; public void connect(String db) throws SQLException, ClassNotFoundException { try { Class.forName(driverName).newInstance(); con = DriverManager.getConnection(url + db, userName, password); } catch (Exception e) { // dbase not found? System.out.println (e.getMessage());
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Project4 - Date: 4/23/2003 Course: Web Server Programming...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online