Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC - Connecting to local MSAccess database???

Status
Not open for further replies.

porto2001

Programmer
Mar 7, 2001
24
PT

I want to connect an applet to my local MS Access database
using JDBC. When i run the applet with applet viewer, everything is Ok, the problem is when a try it in a browser.
He can't load the JdbcOdbcDriver.

Everything is in my computer, i´m not trying to connect to a web server or database server.

I dont know if it could be done, or if im not installing the jdbcdriver correctly?




 
there has been a lot of discussion on this forum about doing exactly this. it is possible to connect an applet to a database but this method of database connection isn't recommended, in terms of an application arch/setup. best have an applet talk to a servlet and have the servlet(or other sub components) talk to a database

the applet probably can't load the driver as it doesn't have permissions to access your local hard drive. check your security policy.
 
The problem has to do with java applet security model. If you were to connect to the same page from a separate computer then I am pretty sure it would work. The security model says that an applet cannot access the local machine of the browser. An applet can only access the machine it originated from (in theory) unless you use a proxy. The problem is that the server and client are the same machine in your case. I think IE is interpretating this as the applet trying access its local machine and your jdbc connection is being denied. The reason it works in appletviewer is because security is not enforced as much.

Also what LittleWing has said is sound advice. Wushutwist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top