This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
 
Similar Threads
appletJdbcconnection
URGENT !! JDBC and applets
Applets and JDBC
JApplet in Browser : Connection Problem
Applet to Database connection