This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can Applets read/write to Access?

 
Tom Doganoglu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tom Doganoglu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tom Doganoglu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic