• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using JDBC in applets - security exception

 
Ajay Patel
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
i have been trying to connect to a access database through the jdbc. my code works perfectly fine when i run it as a stand alone program. but the same code when run as a applet gives the following exception while establishing the connection:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
the error probably is due to the security policy of applets. this is the first time i am working with jdbc in applets so i cant exactly pin point the source of error. both the applet and the database or on the local machine. how do i granct access rights to the applet to connect to the database?
thanx in advance.
AJ
 
Monty Ireland
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to review how the POLICYTOOL utility works...
I made a post to this form about 6 months ago...
Search for POLICYTOOL
I have been busy but will check back to see if you have any questions in a few days..
------------------
Multi-Platform Database Developer ( on E.S.T. )
 
Ajay Patel
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Monty.
I was not aware of the PolicyTool. I found your posting in the forum and it was very helpful.
thanx again
AJ
[This message has been edited by Aj Patel (edited June 21, 2001).]
 
charles mee
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is an example from javacode.net - this talks about what you are trying to do:
http://www.javacode.net/xq/ASP/txtCodeId.1838/lngWId.2/qx/vb/scripts/ShowCode.htm#applet
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic