• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connect to database on client?

 
Debbie Argulkar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Debbie Argulkar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic