Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us
Imprinted Gifts
Promotional Products
Get Business Software
KVM over IP
Promote Your Website
Memory Upgrades
Compare Prices
PDA Phones & Cases
GPS
Promotional Pens
Logo Design
Shop Online
Online Education
Find Software

Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers



Quality Management ROI Calculator - Focus on Test Automation
The Rational Quality Management ROI calculator is intended to give you an idea of what return you can garner from implementing our functional testing solutions. Our quality management solutions offer tools to develop a continuous process, powered by automation to govern software delivery. »

Gartner MarketScope: Application Quality Management Solutions, 1Q 08
This Gartner MarketScope provides guidance for enterprises seeking to purchase tools to manage risk and software quality. We focus on tools fit for large-scale enterprise use and that are ready out of the box to manage quality requirements and functional testing. »

Whitepaper: Tips for Writing Good Use Cases
Writing a good use case isnt easy, but, fortunately, our experience can be your guide. The concepts and principles assembled here represent the works of many people at IBM, and they form a foundation of proven best practices. »

Whitepaper: The Role of Integrated Requirements Management in Software Delivery
Learn about the critical role integrated requirements management can play in helping ensure your business goals and IT projects are continuously aligned-whether you are sourcing, integrat-ing, building or maintaining your software. It also looks at ways that integration and automation can help ensure managing projects and the required changes can be executed using manageable processes that satisfy stakeholders and development teams. »
Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

JDBC a Brief Introduction

June 12, 2000

JDBC (Java database connectivity) is an API for database access from within a Java program. You can use JDBC to access any database that supports the API by providing a JDBC driver.

JDBC is similar to ODBC in the sense that it is database independent.

For more information on JDBC Check out the Sun JDBC Product page.

There are two most commonly used versions of JDBC API. The JDBC 1.2 API and the more recently released JDBC 2.0 API. There are some distinct advantages of using JDBC 2.0. We will cover that a little later. First let's see how to write a simple program using the common features of JDBC APIs

To use the JDBC API to access any database you need a JDBC driver. These drivers are either written purely in Java, or use the Java Native Interface. Here is the list of different drivers available.

For our example we will use the JDBC-ODBC bridge available from SUN. (Please Refer to Appendix A for more instructions on installing an Oracle JDBC driver). If you have JDK1.2, you probably have the JDBC-ODBC bridge with you!

If you are using any other JDBC driver, please follow your driver vendor's instructions to install the driver.

If you want to use the JDBC - ODBC bridge, all you need to do is to create an ODBC driver to connect to your database.

NOTE: We will assume that you have the following set up.

  1. A database with a sample table named USERTABLE with the following fields USERID char(5) and PASSWORD char(5). An example of a create statement is:
    CREATE TABLE USERTABLE 
    	(
    	USERID   CHAR(5),
     	PASSWORD CHAR(5)
    	);
    

    You can insert a record in this table with

    Insert into USERTABLE (USERID , PASSWORD)
    	    Values('guest', 'guest');
    
  2. An ODBC driver to connect to this database.

We will assume the DSN (data source) name as myDriver

Warning The execution of the sample code will depend on the driver and the driver set up. It is important that you understand how to install a database driver (JDBC and / or ODBC) and how to connect to your database using this driver.

Please Refer to Appendix A for more instructions on installing the JDBC and ODBC drivers.

Building Web Applications Using Servlets and JSP Part II
Building Web Applications Using Servlets and JSP Part II
Retrieving Data - a Simple JDBC Example


Up to => Home / Authoring / Java / Servlets




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers