Applets and JDBC?

I have a few questions, please answer them.

#1. Can applets import the JDBC library if the applet is in a JAR archive?

#2. My remote database (which came with my website domain hosting) only allows access to the database from the pages on the site, like I cant connect remotely from a java application. Could an applet connect to the database using "localhost" as the address? Or would "localhost" just point to the users computer (the person running the applet)

thank you!

[498 byte] By [DarkNomada] at [2007-10-2 10:18:20]
# 1

Applets can import(and download of cource) any libray you have in the codebase. So, if not present on the client, you have to add the proper jdbc jar. On the other side you must apply the correct policy, in order for the applet to connect to a database.

Regarding your second question, you will not be able to connect using locahost. Applets run on the client, so localhost will point there.You have to configure your database access rules too.

Kiros

kiros1979a at 2007-7-13 1:45:23 > top of Java-index,Desktop,Core GUI APIs...