Solved

connection to DB from an applet

Posted on 2002-07-22
14
252 Views
Last Modified: 2010-03-31
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
0
Comment
Question by:gilboker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 92

Expert Comment

by:objects
ID: 7170929
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
 
LVL 1

Author Comment

by:gilboker
ID: 7170939
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
 
LVL 92

Expert Comment

by:objects
ID: 7170958
Because it's not a type 3 or 4 driver.
Get yourself a type 3/4 driver and it will work.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 16

Expert Comment

by:heyhey_
ID: 7171109
> 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
 
LVL 5

Expert Comment

by:kelfink
ID: 7173015
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
 
LVL 92

Expert Comment

by:objects
ID: 7173153
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
 
LVL 1

Author Comment

by:gilboker
ID: 7214478
kelfink
Where can i find this type of JDBC bridge(type 4)?
0
 
LVL 92

Expert Comment

by:objects
ID: 7215904
Depends on you DB.
0
 
LVL 1

Author Comment

by:gilboker
ID: 7216098
im using MSSql7
0
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 7216109
There's a free one available at www.freetds.org.
0
 
LVL 1

Author Comment

by:gilboker
ID: 7216151
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
 
LVL 1

Author Comment

by:gilboker
ID: 7216193
Sorry i was meaning to say im building a forum not a chat sorry again
0
 
LVL 92

Expert Comment

by:objects
ID: 7216209
Yes you can use it to connect from an applet.
0
 
LVL 1

Author Comment

by:gilboker
ID: 7216232
Sorry i was meaning to say im building a forum not a chat sorry again
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question