Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

can Applets read/write to Access?

 
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
 
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java 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: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java 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?
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic