1 Reply Latest reply: Jun 30, 2008 9:55 AM by 666705 RSS

    SQLstate(01000) vendor code(5701)

    666705
      Hi;
      windows 2003 sp2
      MsSql2000 sp4

      Console Release Build8.1.6.0Server Release Build8.1.6.0Server BuildWebLogic Server 8.1 SP6
      All Server Product VersionsWebLogic Server 8.1 SP6
      WebLogic XMLX Module 8.1 SP6

      // FileName="Connection_jdbc_conn.htm"
      // Type="JDBC" ""
      // DesigntimeType="JDBC"
      // HTTP="true"
      // Catalog=""
      // Schema=""
      Connection ConnMadmad = null;
      try {
      String MM_conGok_DRIVER = "weblogic.jdbc.mssqlserver4.Driver";
      String MM_conGok_USERNAME = "madmad";
      String MM_conGok_PASSWORD = "madmad";
      String MM_conGok_STRING = "jdbc:weblogic:mssqlserver4:127.0.0.1;db=Madmadmad;weblogic.codeset=windows-1254";

      Driver DriverMadmad = (Driver)Class.forName(MM_conGokova_DRIVER).newInstance();
      ConnMadimak = DriverManager.getConnection(MM_conGok_STRING,MM_conGok_USERNAME,MM_conGok_PASSWORD);

      } catch (ClassNotFoundException e) {response.sendError(1, "Veri Tabaniyla Sunucusu Cok Yogun Lutfen 5 Dakika Sonra Yeniden Deneyiniz Ilginiz Icin Tesekkurler...");
          } catch (SQLException e) {
      response.sendError(1, "Veri Tabaniyla Sunucusu Cok Yogun Lutfen 5 Dakika Sonra Yeniden Deneyiniz Ilginiz Icin Tesekkurler...");
      ConnMadmad.close();
           ConnMadmad=null;
           }


      PreparedStatement StatementGuvenlikSorusu = ConnMadmad.prepareStatement("SELECT TOP 1 Id, Islemler, Cevap FROM Bot_Korumasi ORDER BY NEWID()");
      ResultSet GuvenlikSorusu = StatementGuvenlikSorusu.executeQuery();
      boolean GuvenlikSorusu_isEmpty = !GuvenlikSorusu.next();
      boolean GuvenlikSorusu_hasData = !GuvenlikSorusu_isEmpty;
      Object GuvenlikSorusu_data;
      int GuvenlikSorusu_numRows = 0;

      GuvenlikSorusu.close();
      StatementGuvenlikSorusu.close();
      ConnMadmad.close();
      ConnMadmad=null;


      ###jdbc.log###
      DriverManager.initialize: jdbc.drivers = null
      JDBC DriverManager initialized
      registerDriver: driver[className=weblogic.jdbc.mssqlserver4.Driver,weblogic.jdbc.mssqlserver4.Driver@277dba]
      DriverManager.getConnection("jdbc:weblogic:mssqlserver4:127.0.0.1;db=Madmad;weblogic.codeset=windows-1254")
      trying driver[className=weblogic.jdbc.mssqlserver4.Driver,weblogic.jdbc.mssqlserver4.Driver@277dba]
      SQLWarning: reason(Changed database context to 'Madimak'. Severity 0, State 2, Procedure 'SERVER null', Line -1) SQLstate(01000) vendor code(5701)
      BaseHandler.appendWarning - java.sql.SQLWarning: Changed database context to 'Madmad'. Severity 0, State 2, Procedure 'SERVER null', Line -1
      SQLWarning: reason(Changed language setting to Türkçe. Severity 0, State 1, Procedure 'SERVER null', Line -1) SQLstate(01000) vendor code(5703)
      BaseHandler.appendWarning - java.sql.SQLWarning: Changed language setting to Türkçe. Severity 0, State 1, Procedure 'SERVER null', Line -1
      getConnection returning driver[className=weblogic.jdbc.mssqlserver4.Driver,weblogic.jdbc.mssqlserver4.Driver@277dba]
      DriverManager.getConnection("jdbc:weblogic:mssqlserver4:127.0.0.1;db=Madmad;weblogic.codeset=windows-1254")
      ############################

      why?

      Thanks...

      --
      Edited by x_cem at 06/30/2008 4:42 AM
        • 1. Re: SQLstate(01000) vendor code(5701)
          666705
          The 'changed database context' message is just one of the
          chatty informational messages that SQLServer has
          historically returned to the client, which are universally
          ignored. The JDBC driver must make any non-exception
          DBMS message available via a SQLWarning. Ignore it
          unless you're surprised that your default database context
          is Madimak. The cause of the message is that the initial
          context of a new connection is actually master, until the
          DBMS changes it to the user's default context.
          Lastly, that is an old driver you're using. You're welcome
          to it, but you will get better performance and put less load
          on the DBMS if you switch to the newer MS or weblogic
          SQLServer drivers. Also, why are you not using weblogic
          pooling? You should never call DriverManager.getConnection()
          in a multithreaded application like weblogic. It's class-
          syhchronized, along with the call for logging JDBC, so it
          could halt all JDBC in the whole JVM.
          Joe