Skip to Content
author's profile photo Former Member
Former Member

Connect WDJ to Sql server 2005

Dear Experts,

I need to connect, SQL server 2005 unsing WD java, can any one tell me what steps i need to do on WDJ side to established the connection.

Also the what all jar files required to connect SQL 2005.

Thank

AB

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jul 20, 2011 at 04:57 PM

    what's the version of your nw java server?

    if you are in nw7, you have to create a datasource in VA

    if you are in CE, you have to create a datasource in NWA.

    after the data source is created, the left is pure java programming.

    try {
    InitialContext initialContext = new InitialContext();
    DataSource dataSource = (DataSource)initialContext.lookup("jdbc/YOUR_DB_ALIAS");
    connection= dataSource.getConnection();
    } catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (NamingException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2011 at 05:58 AM

    Hi Anup,

    If you are using NWDS 7.0 version, you have to create a Datasource in visual admin.

    If you are using CE 7.1 version, you have to create a Datasource in NWA--Configuration Management->Infrastructure->Application Resources.

    Step by step procedure how to create a Datasource in NWDS 7.0 and CE7.1 is given in this PDF link.

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40db1ed9-b7c2-2b10-66b8-84f6954b6d2d?quicklink=index&overridelayout=true

    MYSQL Server 2005

    Driver/jar which you have to use --> sqljdbc.jar

    Driver class --> com.microsoft.sqlserver.jdbc.SQLServerDriver

    Connection URL --> jdbc:sqlserver://<host_name>:<port>;database=<db_name>

    Hope this helps you..

    Regards,

    Saleem Mohammad

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2011 at 01:22 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.