Hi, I know accessing a database from Applet has been discussed a lot times in this forum. But I m shortening the scope of my query in the following way explaining my scenario. Scenario A group of company has its separate web sites for its individual businesses that uses MySQL as their backends, separately. Some applets will be developed that can query data from those database and delivered to those companies. They will use those applets in their web pages. A little deploy time modifications are acceptable. Some of those sites are written in PHP, some in ASP and some in JSP/Servlet. 1. I have to find out how is it possible for an applet to access remote databases using the data source names and corresponding name/password. 2. No policy file will be supplied to my client. It's not intranet. 3. Signed applet should be avoided in my findings, as this will only be used if no other option is available. 4. Http Tunnelling is the best way I know, but that is also out of scope in my scenario. I first tried accessing local database from my Eclipse and its works fine through Eclpise runtime. But Eclipse writes a policy file that gives all permissions to the appletviewer and so it connects to the database without probolem. When I use it from browser or appletviewer from command promt, it can't connect to the database as I expected. So I thought why don't I jar the database driver with the applet for my mysql database. And so prepared a jar containing my codes and pciked another mysql-connector-java-3.0.9-stable-bin.jar (MySQL driver). BTW, is this not a pure JDBC type 4 driver? Now still my applet can't access the database. I am looing to my codes whether it has some problem with driver name, but no. Any other viable solutions? Comments are appreciated.
Ashik Uzzaman Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Now I thought that okay, local file system will protect the applet with Security Exception naturally. Then what about using data source name as URL? So I used one of my products' mysql host to connect and retrive a simple select statement from applet.