Java Reference
In-Depth Information
F IGURE 7.10
The Movie Catalog database.
L ISTING 7.2
InsertDataApp.java
import java.sql.*;
public class InsertDataApp {
public InsertDataApp() {
}
public void insertData() {
Connection con = null;
try {
// Load the Driver class file
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
// Make a connection to the ODBC datasource Movie Catalog
con = DriverManager.getConnection(“jdbc:odbc:Movie Catalog”,
“”, “”);
Search WWH ::




Custom Search