This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes Can applet access database directly? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Can applet access database directly?" Watch "Can applet access database directly?" New topic
Author

Can applet access database directly?

Caroline Iux
Ranch Hand

Joined: May 14, 2001
Posts: 103
Hi all,
I have a question from IBM certification pre-assessment site. The cert is about IBM software Visual Age for Java. But I have a problem with an applet-related question. I personally don't have too much experience with applets, so I am counting on you applet gurus to explain it to me. Thanks!
Which of the following are true with respect to configurations of Java solutions that allow many individual clients to access a database on a centralized host computer:
(b,c)?

a) an Applet must go through a Servlet to gain access to a database.
b) a web browser can utilize a Servlet which in turn can access the database through a database driver.
c) a web browser can run an Applet which in turn can access the database through a database driver.
d) a Servlet should use the Java Native Interface (JNI) to gain access to a database.

Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
Jimi Rock
Ranch Hand

Joined: Feb 19, 2001
Posts: 134
Caroline,
B & C are correct as I think according to my previous applications..
when using an applet, it is just a few lines of code to establish a JDBC connection to the database and specify the required driver.
not all the drivers can access a remote database.
Regards,
MAC.

[This message has been edited by Jimi Rock (edited July 30, 2001).]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

** concurrence **
A is false - you CAN go through a servlet, but you don't HAVE to
D is false - you CAN use JNI to access a database (e.g. invoke MS SQL Server via a JNI class wrapping ADO), but it's not a good idea - JDBC is much more portable, ergo, you SHOULD *NOT* use JNI (as opposed to CAN not or MUST not!).


Customer surveys are for companies who didn't pay proper attention to begin with.
Caroline Iux
Ranch Hand

Joined: May 14, 2001
Posts: 103
Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can applet access database directly?
 
Similar Threads
Please help identify 6 wrong answers
long post IBM.158
Visual Age Cert question
Passed 700,701 and 340 last Thursday
Check out the qtns for Part I