This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes using JDBC in applets - security exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "using JDBC in applets - security exception" Watch "using JDBC in applets - security exception" New topic
Author

using JDBC in applets - security exception

Ajay Patel
Ranch Hand

Joined: Jan 02, 2001
Posts: 39
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

Joined: Oct 03, 2000
Posts: 161
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. )


Multi Platform Database Developer & DBA on E.S.T.
Ajay Patel
Ranch Hand

Joined: Jan 02, 2001
Posts: 39
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

Joined: Jun 20, 2001
Posts: 5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using JDBC in applets - security exception
 
Similar Threads
jdbc connectivity through applets
jdbc-applet
MySQl with Eclipse3.2
Using JDBC.ODBC Driver with an applet
Applet with JDBC