954,157 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Java Applet JDBC

I have a java applet on my website and i need it to connect to my mysql database. When I was trying to figure out how to do this i saw several examples that used jdbc. I'm confused can I use this to connect to my mysql data base at mysql.mysite.com. I am using a web hosting service(dreamhost) for my website. The line that is confusing me the most is

String url = "jdbc:mySubprotocol:myDataSource";

kinger29
Light Poster
36 posts since Mar 2008
Reputation Points: 11
Solved Threads: 2
 

url = "jdbc:mysql:ipaddress/databasename"
should work
remember that the mysql server should be running from same server as the applet, else i might give some policy errors

AMetnik
Newbie Poster
20 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

Dear,

Applets are designed for rich-client application. So with default implementation of applet, you can't add IO and database operations.

But, to do so, you have to create security sub-class and policy.

__avd
Posting Genius (adatapost)
Moderator
8,647 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You