I know that you can use applets to read and write from databases, but is there some special case with Microsoft Access? I created an Application that read from Access fine, when I turned it into an Applet it wouldn't read anything from the database?? If there is some security restriction, is there any way to get around it? Thanks all, Tom
You can use jdbc to access (no pun intended) Access databases - there may be some JNI connectors as well. Either approach requires a signed applet in order to run in a web browser.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Aug 01, 2001
I'm using the JDBC to connect to access...shouldn't it be working if all I'm doing is reading a database in the same directory that the applet is in?
(as of right now, it's not working in Appletviewer either...) Tom
Joined: Aug 01, 2001
Okay, another piece of the puzzle: I now know that the reason the applet isn't working is because it doesn't have reading permission. So I went into policytool, and tried to set up a permission for my class to be able to read files...but the policy never seems to be found?? It keeps looking for it in one of my directories, and I keep trying to put it in the same directory as my applet...how do I get it to grant my class file permission to read files? Tom
This "I can do 'x' if it's in the same directory the applet's in" seems to be the Java equivalent of an urban legend. Consider: the applet was downloaded from the web server. What directory is it really "in"? When you run the applet viewer, that's a different matter, since you're loading the applet locally, but it's because the applet viewer has a leakier sandbox that you actually get the rights. According to my Linux system, the policy file should be a hidden file in my home directory (thus, I can only set rights for ME, as opposed to screwing around with other user's security). There should also be a master policy file which this one overrides. Not sure why you can't access the DB in appletviewer before you started tinkering with policy though. Are you using the jdbc-odbc bridge?