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

Connect webdynpro callable object with ms sql server 2000

Hi all

how connect webdynpro callable object with ms sql server 2000?

How can I register on the portal as an additional connection?

thank you very much!

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2008 at 05:00 AM

    hi read the following docs to get an idea on how to connect to a external database liks mssql200

    connect-to-sql-server-mssql-with-jdbc-10-from-webd

    Connecting an Application to an External Database in SAP NW CE 7.1

    /message/286112#286112 [original link is broken]

    Thanks and Regards

    shanto aloor

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2008 at 05:25 AM

    Hi,

    as it is given the web log(given in previou answer by Aloor), you have to create a custom data source to connect to the external database like MySQL, MS SQL etc.

    The web log explains you how to create data source to the MY SQL server. You ccan use the same procedure to connect to the MS SQL Server but you have to provide parameters of MS SQL instead os MY SQL. Go through this [wiki |https://www.sdn.sap.com/irj/scn/wiki?path=/display/vc/jdbcConnectionSetup&]page to get these parameters.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 16, 2008 at 01:09 PM

    Thanks for your answers, Now I have the following problem, to develop this code:

    try {
    		InitialContext iC = new InitialContext();
    		DataSource dataSource = (DataSource)iC.lookup("jdbc/ConnectionAlias");
    		Connection con = dataSource.getConnection();
    		java.sql.Statement stmt = con.createStatement();
    		ResultSet rs = stmt.executeQuery("select * from ejemplo");
    		while (rs.next()){
    			com.sap.test.sql.testsql.wdp.IPrivateTestIViewView.IDatosElement 
                                                             DatosElement = 
                                                             wdContext.nodeDatos()
                                                             .createDatosElement();
    			DatosElement.setId(rs.getString("id"));
    			DatosElement.setNom(rs.getString("nom"));
    			DatosElement.setNum(rs.getInt("num"));
    		}
    	}catch (SQLException e) {
    		wdContext.currentContextElement().setB(e.getMessage());
    	}catch (Exception e){
    		wdContext.currentContextElement().setB(e.getMessage());
    	}

    and shows me the following exception

    ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

    the data that you place in the visual administrator were:

    Drivers: com.sap.aii.af.jmsproviderlib (msutil.jar , mssqlserver.jar , msbase.jar)

    DataSources: sap.com/JDBCConnector_MyDatasource.xml

    Name: MyDatasource

    Alias: ConnectionAlias

    DriverName: com.sap.aii.af.jmsproviderlib

    JDBC Version: 1.x

    Driver Class: com.microsoft.jdbc.sqlserver.SQLServerDriver

    Database URL: jdbc:microsoft:sqlserver://181.42.101.219:1433;DatabaseName=test

    User: sa

    Password: abcd1234

    did not know the cause of the problem

    thanks!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 07:14 PM

    Thanks for your answers, but it solves the problem.

    Installation was a problem in Microsoft SQL, and what reinstall I worked well

    thanks

    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.