I think your problem is about connecting to an SQL server installed in a
machine other than the one applet comes from (i.e. codebase machine).
This is from Applets Security FAQ [ http://java.sun.com/sfaq/ ]:
"How can an applet open a network connection to a computer on the
internet?
Applets are not allowed to open network connections to any computer,
except for the host that provided the .class files. This is either the
host where the html page came from, or the host specified in the codebase
parameter in the applet tag, with codebase taking precendence.
For example, if you try to do this from an applet that did not originate
from the machine foo.com, it will fail with a security exception:
Socket s = new Socket("foo.com", 25, true);"
there is nothing logically wrong about using Applets JDBC
ability, the above limitation would prevent it.
Solutions are as follows:
1. (Easy way) Install SQL Server on the machine Apple t comes from.
2. (Network way) NAT from codebase machine to the SQL Server Machine
3. (Java way) Overwrite Java's default security with grant files.
If you send the exception you encounter - when trying to connect - we can
help you more.