Java
  Home arrow Java arrow Page 2 - Developing SQL Server based Java Apps usin...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Developing SQL Server based Java Apps using NetBeans IDE
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 16
    2006-05-24

    Table of Contents:
  • Developing SQL Server based Java Apps using NetBeans IDE
  • What do we need to connect to Microsoft SQL Server from Java (or JDBC)?
  • How to configure CLASSPATH to connect to Microsoft SQL Server database
  • How to establish a Microsoft SQL Server database connection using JDBC
  • Creating a Microsoft SQL Server database connection using NetBeans IDE: Form Design
  • Creating a Microsoft SQL Server database connection using NetBeans IDE: the nucleus

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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).

    More Java Articles
    More By Jagadish Chaterjee


       · Hello guys. This contribution helps you to work with SQL Server using Java...
       · Sir, your article was really helpfull. But Sir,could you please tell me how to do...
     

    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...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek