2 Replies Latest reply on Aug 23, 2007 1:57 PM by 807605

    Database Connectivity Issue

      Hi all,

      I am facing a problem during database connectivity by ODBC connection.

      I used the below query for creating connection
      connection = DriverManager.getConnection("jdbc:odbc:DSNNAME", "username", "password");
      it is working fine with one SQL server.. but when am trying to another SQL Server i got the following error.

      java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

      But on configuring DSN i'm able to connect to the server and it says "TEST COMPLETED SUCCESSFULLY".

      Also i'm able to connect to the SQL thru Query Analyzer. Only problem upon connecting thru the above Java coding. PLease help me to resolve this. Thanks in Advance