connection to DB from an applet

hi.
IM building a chat on the web and i wanted to keep info in some tables and then loop around them to take the data.

my Q is, can i connect to DB by an applet and if so, how?
i connect threw applications with the JDBC driver but it doesent seem to work from an applet.
thanks
LVL 1
gilbokerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
objectsConnect With a Mentor Commented:
There's a free one available at www.freetds.org.
0
 
objectsCommented:
You can certainly connect to a database from an applet in exactly the same way you do from an application.
If you're applet is not signed then you must use either a type 3 or 4 JDBC driver.
0
 
gilbokerAuthor Commented:
well im using JdbcOdbcDriver and i dont know why it doesent connect from the applet after loading to web page.

i have the same example in an application and there it work perfectly
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
objectsCommented:
Because it's not a type 3 or 4 driver.
Get yourself a type 3/4 driver and it will work.
0
 
heyhey_Commented:
> Get yourself a type 3/4 driver and it will work.

you probably won't find such driver for Access :)

try MySQL + mmsql jdbc driver

P.S. IMHO using datatbase from applet to implement chat is TERRIBLE design
0
 
kelfinkCommented:
Type 4 jdbc can connect from an applet, but ONLY by connecting to a database on the machine which served the applet.  
It would be a browser security violation, if an applet
was allowed to open network connections anywhere but back to the server it was launched from.
0
 
objectsCommented:
Type 3/4 drivers for Access exist, they just cost money :)
Have a look at JDataConnect at http://www.j-netdirect.com/ I think they have a single connection license for free.

I agree regards the design decision.
0
 
gilbokerAuthor Commented:
kelfink
Where can i find this type of JDBC bridge(type 4)?
0
 
objectsCommented:
Depends on you DB.
0
 
gilbokerAuthor Commented:
im using MSSql7
0
 
gilbokerAuthor Commented:
Points r your objects just tell me againcan i use this to conect fro an applet to DB or i have to make security changes?
0
 
gilbokerAuthor Commented:
Sorry i was meaning to say im building a forum not a chat sorry again
0
 
objectsCommented:
Yes you can use it to connect from an applet.
0
 
gilbokerAuthor Commented:
Sorry i was meaning to say im building a forum not a chat sorry again
0
All Courses

From novice to tech pro — start learning today.