wood burning stoves 2.0*
The moose likes Applets and the fly likes Applet to database connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet to database connection" Watch "Applet to database connection" New topic
Author

Applet to database connection

pankaj patil
Ranch Hand

Joined: Dec 19, 2004
Posts: 98
Hi

I have an urgent requirement . how to connect applet with the database

i need the code .

pls help me out

With regards
pankaj


Regards,
Pankaj Patil
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41096
    
  44
Accessing a DB from an applet is not different than connecting from any other piece of Java code. Of course, applets are restricted as to which host they can connect to. Specifically, they can only connect to the machine where they originate (i.e., where the web server is located). If the DB is not located on that machine, the applet will either have to be signed (which gets aroung the host restriction), or you will need a DB proxy on the web server host, which takes your DB calls and routes them to the proper DB host.
If you describe in more detail where you are stuck we may be able to give you more specific advice.


Ping & DNS - my free Android networking tools app
pankaj patil
Ranch Hand

Joined: Dec 19, 2004
Posts: 98
Hi

i have written a code in applet but it give me error

specified server not found

with regards
pankaj
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41096
    
  44
You are aware of the restriction I mentioned, that an applet can only connect to the server where it originates? More information can be found in the Applet FAQ, which is linked in my signature.
[ October 22, 2005: Message edited by: Ulf Dittmer ]
 
Consider Paul's rocket mass heater.
 
subject: Applet to database connection
 
Similar Threads
my applet can't connect to database
database connectivity
connect applet to database?
CGI and Applets
applet with jdbc