Hello,
I have yet to use Java with MS Access although by a quick Google search Im guessing its basically the same as all popular databases output results in ODBC form, which is just a global form of database output that everyone follows to making it easy to use the data. Just like what XML does for the web.
My Google Search: http://www.google.com/search?hl=en&safe=off&q=Java+connecting+to+MS+Access+DB&btnG=Search
Here is a great article for JDBC (Java's ODBC accessing extension Im guessing) I found by searching Google: http://www.developer.com/db/article.php/10920_3571661_1
And here is some code taken from page 3 of that article:
// JDBC|Test – complete code
public class JDBCTest {
public static void main(String args[]){
RunDB runDB = new RunDB();
try{
runDB.loadDriver();
runDB.makeConnection();
runDB.buildStatement();
runDB.executeQuery();
}catch(Exception e){
e.printStackTrace();
}
}
}
//RunDB
import java.sql.*;
public class RunDB {
Connection connection;
Statement statement;
public void loadDriver() throws ClassNotFoundException{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
public void makeConnection() throws SQLException {
connection=
DriverManager.getConnection("jdbc:odbc:purchaseOrder")
}
public void buildStatement() throws SQLException {
statement = connection.createStatement();
}
public void executeQuery() throws SQLException {
boolean foundResults =
statement.execute("SELECT * FROM Transaction");
if(foundResults){
ResultSet set = statement.getResultSet();
if(set!=null) displayResults(set);
}else {
connection.close();
}
}
void displayResults(ResultSet rs) throws SQLException {
ResultSetMetaData metaData = rs.getMetaData();
int columns=metaData.getColumnCount();
String text="";
while(rs.next()){
for(int i=1;i<=columns;++i) {
text+="<"+metaData.getColumnName(i)+">";
text+=rs.getString(i);
text+="</"+metaData.getColumnName(i)+">";
text+="n";
}
text+="n";
}
System.out.println(text);
}
}
As you can see, its fairly like PHP, obviously function names are different and syntax is different, although you can get the general idea if you are already familiar with PHP.
For example:
statement.execute("SELECT * FROM Transaction");
"execute()" in PHP would be "mysql_query()".
As for applets. They can be useful for alot of things, although as soon as you try to access things outside the applet, Java can be a real pain. Im not sure about security rights for JDBC, although I know filesystem is a pain, you need to setup a certificate the user needs to accept.
If you also have to produce a website, why not use PHP for that?
Hope that helps somewhat.