Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

    Question Database Connection

    hi friends!
    i m new on this forum, i don't know whether this thread is discussed on this forum or not, my problem is , how can i connect db2 to my jsp pages?

  2. #2
    henry_78 is offline Member
    Join Date
    Aug 2007
    Posts
    47
    Rep Power
    0

    Default

    Hello,
    To connect to and dbms from java, u have to usee thee JDBC technology.
    U have download from internet a jar that is suppose to implement a driver for comunication and data mapping between java and the dbms.
    then in your code u have to load the driver by using the class.forName("driver-name");
    then u have to create the connection by the methdo DriverManager.getConnection(url, userName, password).
    Url: its the url of your DB
    Is is a method to connect to your db..there are other methods..bye

  3. #3
    m_srikanth is offline Member
    Join Date
    Nov 2007
    Posts
    8
    Rep Power
    0

    Default

    This is a good tutorial on how to connect to DB form jsp.

    MySQL Database Connectivity with JSP (Windows) by Daniel M. Hendricks

Similar Threads

  1. connection problem
    By subash in forum JDBC
    Replies: 5
    Last Post: 04-22-2008, 09:17 AM
  2. JSP - using connection cache
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-30-2008, 09:54 AM
  3. no connection
    By even in forum JDBC
    Replies: 15
    Last Post: 01-02-2008, 01:50 PM
  4. Database connection
    By oaklander in forum New To Java
    Replies: 2
    Last Post: 11-12-2007, 11:11 PM
  5. error I/O connection
    By bbq in forum JDBC
    Replies: 1
    Last Post: 07-05-2007, 01:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •