[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

Connect Applet with SQL Server

I’m tried to implement a simple project (Applet) which will manage the online registration process with Symantec Visual Café 3.0.  The process will receive the users name, address and phone number and pass the information to MS SQL Server 7.0.  Besides that, the usersalso can view , searching and modify the database.  I’m hope that someone can mail me the source code something like this kind of project thru huangaun@yahoo.com..  Thanks.
0
HuangAun
Asked:
HuangAun
  • 2
1 Solution
 
Ravindra76Commented:

Hi HungAun,

Is it (i.e Ms0SQL is odbc driver ??).
If it is ODBC driver, you can't connect to database from applets without signing.

There are four types of drivers and applet will access type3 and type 4 databasdrivers. and Jdbc-Odbc bridge will come under type1 category.


There are four types of driver that Java can use to connect to a database directly:

1.The JDBC-ODBC bridge provides JDBC access via most ODBC drivers.

2.A native-API partly-Java driver converts JDBC calls into calls on the client
  API for Oracle, Sybase, Informix, DB2, or other databases.

3.A net-protocol pure-Java driver translates JDBC calls into a database-independent
   net protocol which is then translated to a proprietary database vendor network protocol
  by a server.

4.A native-protocol pure-Java driver converts JDBC calls into a proprietary database vendor
 network protocol.


A Type 3 driver can connect directly from the client to the Server and a two-tier
 type 4 driver could also do this if it connects directly across the network to the database
 server because neither of these types of driver have any dependence on software installed
 on the client.

Other types of driver require the applet to be signed in order to access local propritary
 code to get to the database.


None of these specifically require RMI, but you will need to check what support
 fetures your server has for JDBC connections.


There is lots of info here:

http://java.sun.com/products/jdbc 

and amongst others, some overviews here:

http://java.sun.com/docs/books/jdbc/intro.html 

and

http://www5conf.inria.fr/fich_html/papers/P23/Overview.html 
 
 
  Type 3 and type 4 expensive drivers.

Two solutions for you.

1. Uisng type 3 and type 4 drivers.

2. Writing database login in java servlets and calling servlets from applet through URLConnection class.
0
 
Ravindra76Commented:

For more about database drivers:-

Best answer: Vladi21

Java Database Connectivity is a standard SQL database access interface, providing uniform access to a wide range of relational databases. It also provides a common base on which higher level tools and interfaces can be built. This comes with an "ODBC Bridge" (except on Mac 68K). The Bridge is a library which implements JDBC in terms of the ODBC standard C API.
http://java.sun.com/products/jdk/1.1/docs/guide/jdbc/index.html 
http://java.sun.com/products/jdbc/index.html 
http://java.sun.com/docs/books/jdbc/intro.html 
http://java.sun.com/products/jdbc/faq.html 

Silicaon Valley Java SIG JDBC Talk Page
http://www.hooked.net/~gturner/JDBCTalk.html 

Java how-to DB section
http://tactika.com/realhome/javaht/java-d1.html 

articles from Oracle:
http://technet.oracle.com/tech/java/sqlj_jdbc/index.htm 

JDBC 2.0 New Features
http://java.sun.com/products/jdk/1.3/docs/guide/jdbc/getstart/appendixA.html#1006294 
http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/index.html 

MS bridge
http://www.microsoft.com/Java/sdk/relnotes/JDBCrel.htm 

Drivers:
http://java.sun.com/products/jdbc/drivers.html 
http://www.idssoftware.com/jdriver.htm 

Books online
http://www.itknowledge.com/reference/standard/1576100561/book-index.html 
Java Database Programming with JDBC
http://www.itknowledge.com/reference/standard/1576100561/book-index.html 
Java 1.2 Unleashed : Connecting to Databases with the java.sql Package
http://www.itknowledge.com/reference/standard/1575213893/ch44/ch44.htm 

and some useful DB stuff:
InstantDB
http://208.234.21.207/ 

WebLogic JDBC (30 day trial)
http://www.beasys.com/download/weblogic.html 

http://www.thoughtinc.com/cocofree/doc/index.html 

http://www.agave.com/html/products/jdbc_dwnld.htm 

--
Multilingual Databases and Global Internet Integration
http://www.chg.ru/inet97/A8/A8_2.HTM 

Best of luck
0
 
HuangAunAuthor Commented:
Hi! Ravindra76.
Thanks a lot for ur help.
I'm using Microsoft SQL Serevr 7.0 with Symantec Visual Cafe Professional Edition. Can U guide me on which database driver I need to install for JDBC or ODBC and where to download it?  If can, mind send me the sample source code on how to connect the applet with the SQL database.  The transaction onli required name and identity card number.    Bye. Thanks.
Huang Aun
0
 
muraliramCommented:
Dear friend,

You have to use a type-3 JDBC Driver
for applet to work from anywhere.
So you can use IDSDriver to connect any Database which is a type-3 driver purely implemented in Java. you can download the evaluation copy from
www.idssoftware.com and follow the instructions for installation. Please copy the .jar or .zip file which you will get to c:\jdkinstallation\lib and add this to the classpath. And if you are going to use it in a comercial environment then you should copy the
..jar file into the server.Try.




0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now