Java Applet JDBC

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2008
Posts: 31
Reputation: kinger29 is an unknown quantity at this point 
Solved Threads: 1
kinger29 kinger29 is offline Offline
Light Poster

Java Applet JDBC

 
0
  #1
Apr 26th, 2009
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";
Last edited by kinger29; Apr 26th, 2009 at 4:33 pm.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 7
Reputation: AMetnik is an unknown quantity at this point 
Solved Threads: 0
AMetnik AMetnik is offline Offline
Newbie Poster

Re: Java Applet JDBC

 
0
  #2
Apr 30th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,616
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 469
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Java Applet JDBC

 
0
  #3
Apr 30th, 2009
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.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC