the JDBC class that goes with the previous submitted question.
Books - online resources - any help welcome. JO
import java.sql.*;
public class JDBC {
public static Connection con;
public static Statement stmt;
public static String SQL_STRING;
public static ResultSet my_rs;
public ResultSet getData(){
try {
//step 1 --load the driver
Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
//step 2 --create a connection
String url = "jdbc
dbc:AddressBook";
con = DriverManager.getConnection(url,"","");
//step 3 --
stmt = con.createStatement();
//execute statement and return results
SQL_STRING = "SELECT * FROM AddressBook";
my_rs = stmt.executeQuery(SQL_STRING);
return my_rs;
} catch(Exception e) {
return my_rs;
}
}
}