gilboker
asked on
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
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
ASKER
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
i have the same example in an application and there it work perfectly
Because it's not a type 3 or 4 driver.
Get yourself a type 3/4 driver and it will work.
Get yourself a type 3/4 driver and it will work.
> 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
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
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.
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.
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.
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.
ASKER
kelfink
Where can i find this type of JDBC bridge(type 4)?
Where can i find this type of JDBC bridge(type 4)?
Depends on you DB.
ASKER
im using MSSql7
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
ASKER
Sorry i was meaning to say im building a forum not a chat sorry again
Yes you can use it to connect from an applet.
ASKER
Sorry i was meaning to say im building a forum not a chat sorry again
If you're applet is not signed then you must use either a type 3 or 4 JDBC driver.