Then, download the sample database file that comes with this demo:
rjdemo.mdb (an MS Access DB file -
here's a version for office 97 - rename it into "rjdemo.mdb" before use).
To check everything's right, we suggest you open rjdemo.mdb with MS Access,
and query it: select * from contact
If you still have trouble with Access versions, create the DB yourself:
It works ? Now setup your ODBC data source:
select * from contact
If it does not work, your ODBC data source is not properly configured:
don't go further until it works fine.
javac localdemo.java) and run it
(java localdemo), it should display some data on the screen.
Don't go further until the local example works: it is necessary to make sure
the whole chain, from a java application to MS Access data, is well
configured.
set CLASSPATH=%CLASSPATH%;C:\RmiJdbc\RmiJdbc.jar,
or update the CLASSPATH Environment variable in the System part of the
Configuration Panel if on Windows NT).
java org.objectweb.rmijdbc.RJJdbcServer
javac rjdemo.java) and run it:java rjdemo
Note only two lines of code have really changed to make the demo client/server:
Class.forName("org.objectweb.rmijdbc.Driver").newInstance();
now registers the RmiJdbc Driver instead of the JDBC/ODBC bridge,
and the DriverManager.getConnection(...); first parameter has
changed, it has been extended to specify a server host address.
Note: the example WON'T RUN if org.objectweb.rmijdbc.RJJdbcServer is not
properly launched !!
You can stop org.objectweb.rmijdbc.RJJdbcServer then start the application to
see what happens (an exception is raised and there's no data available),
then restart org.objectweb.rmijdbc.RJJdbcServer and restart the application
(it should work fine again).