Home arrow Java arrow Page 2 - Developing SQL Server based Java Apps using NetBeans IDE
JAVA

Developing SQL Server based Java Apps using NetBeans IDE


This article introduces you to developing Java (or JFC) based applications with Microsoft SQL Server as the database, using NetBeans IDE. In this first article in a series, I will show you how to establish a connection from your Java programs to a Microsoft SQL Server database using JDBC.

Author Info:
By: Jagadish Chaterjee
Rating: 4 stars4 stars4 stars4 stars4 stars / 27
May 24, 2006
TABLE OF CONTENTS:
  1. · Developing SQL Server based Java Apps using NetBeans IDE
  2. · What do we need to connect to Microsoft SQL Server from Java (or JDBC)?
  3. · How to configure CLASSPATH to connect to Microsoft SQL Server database
  4. · How to establish a Microsoft SQL Server database connection using JDBC
  5. · Creating a Microsoft SQL Server database connection using NetBeans IDE: Form Design
  6. · Creating a Microsoft SQL Server database connection using NetBeans IDE: the nucleus

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Developing SQL Server based Java Apps using NetBeans IDE - What do we need to connect to Microsoft SQL Server from Java (or JDBC)?
(Page 2 of 6 )

In this first article of our series, I will show you step-by-step how to establish a connection from your Java programs to a Microsoft SQL Server database using JDBC.

If you’re interested in connecting your Java applets (or applications) to standard RDBMS databases like Oracle, Microsoft SQL Server, Informix, Sybase, and others, JDBC (Java Data Base Connectivity) is your ticket to paradise. The combination of Java’s JDBC and its huge class library makes a powerful database solution. JDBC makes the simple things even easier, without making the complex tasks too difficult.

JDBC is the most important component in the Java stack to deal and work with databases (even at the enterprise level).  It even has several types of drivers supported by several vendors.  Most popular databases like Microsoft SQL Server, Oracle, and so on do provide drivers free of charge (as a separate download or through a customized setup). 

Before you start working with JDBC, you’ll need a copy of the Java JDK.  JDBC is automatically installed with the latest JDK (or even NetBeans IDE). Once you have the JDK, the next thing you need to do is get the correct JDBC driver for your database. In most cases the JDBC driver will be provided by the respective database vendor.

In this case, I would like to deal with Microsoft SQL Server.  At the time of this writing, I have two famous versions of Microsoft SQL Server.

  • Microsoft SQL Server 2000
  • Microsoft SQL Server 2005

Any prior version of Microsoft SQL Server 2000 is not supported by Microsoft for dealing with JDBC.  To work with Microsoft SQL Server 2005 using JDBC, you are required to download and install the “Microsoft SQL Server 2005 JDBC Driver” available FREE of charge at http://msdn.microsoft.com/data/jdbc/.

At the time of this writing, Microsoft SQL Server 2005 would be too new for Java developers, so I would like to demonstrate using Microsoft SQL Server 2000.  To work with Microsoft SQL Server 2000 using JDBC, you are required to download and install the “Microsoft SQL Server 2000 driver for JDBC Service Pack 3” available FREE of charge at http://www.microsoft.com/downloads/details.aspx?
familyid=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en

There are some minor differences in working with Microsoft SQL Server 2005 when compared with Microsoft SQL Server 2000.  If you must use Microsoft SQL Server 2005 for your application, I suggest you go through the respective documentation (or wait for my upcoming articles).


blog comments powered by Disqus
JAVA ARTICLES

- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...
- Generics and Limitations in Java
- Getting Started with Java Web Development in...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials