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 Connect to database on client? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Connect to database on client?" Watch "Connect to database on client?" New topic
Author

Connect to database on client?

Debbie Argulkar
Ranch Hand

Joined: Jul 26, 2002
Posts: 43
Hi,
I have a very fundamental question. Can I connect to a database on the client through (trusted) applets? How do I go about it? Also, is there any other method of doing that other than using applets?
Please give me an overview of such a method.
-Deb
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14480
    
    7

Yes you can, but it's a royal pain. Most jdbc drivers use a tcp/ip channel to the database server such as SQL Server's 1433 or PostgreSQL's port 5432. Thus, in addition to having to sign the applet (painful enough), you also have to be sure that there will be no firewalls choking off the stream.
Usually it's just easier to do an n-tier solution and use http tunnelling between the applet and a servlet or JSP which does the actual database work.


Customer surveys are for companies who didn't pay proper attention to begin with.
Debbie Argulkar
Ranch Hand

Joined: Jul 26, 2002
Posts: 43
Hi Tim,
Can you please explain that in a little more detail to me? Do you perchance have any sample code or any relevant links to help me understand better?
Thanks for your prompt response.
-Deb
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connect to database on client?
 
Similar Threads
JDBC in applets
Weblogic DB Drivers
Servlets or EJB ?
about method close
Using JDBC.ODBC Driver with an applet