File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to connect applet to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to connect applet to database" Watch "How to connect applet to database" New topic
Author

How to connect applet to database

srirag
Greenhorn

Joined: Jul 25, 2001
Posts: 2
i have to form tree structure using siwng ONLY in applet data has tocome from database
------------------
prashant komaragiri
Ranch Hand

Joined: Jan 23, 2001
Posts: 36
I think u cannot directly connect an applet to the database. u might have to use a servlet in between.
prashant
Originally posted by srirag:
i have to form tree structure using siwng ONLY in applet data has tocome from database


Sun Certified Programmer for Java 2 Platform
Ahsan Hadi
Greenhorn

Joined: Jul 12, 2002
Posts: 19
You should be able to connect to database from your applet using JDBC, and form the tree by looping through the resultset from a sql query.
If you need to see an example, i can share one.


HADI
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Originally posted by Syed Ahsan:
You should be able to connect to database from your applet using JDBC, and form the tree by looping through the resultset from a sql query.
If you need to see an example, i can share one.
Just to expand a little on the above answer, there are security steps that you need to do before you can connect to the database via an applet( search for "signing applet" or "policy file" ). It is generally recommended that you use a servlet instead as it has many benefits over using only an applet.
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to connect applet to database