Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 21.08.2009 09:26:59 com.microsoft.sqlserver.jdbc.SQLServerConnection <init>
- SCHWERWIEGEND: Die Java-Laufzeitumgebung (Java Runtime Environment, JRE), Version 1.6,
- wird von diesem Treiber nicht unterstützt. Verwenden Sie die Klassenbibliothek
- 'sqljdbc4.jar', die Unterstützung für JDBC 4.0 bietet.
- java.lang.UnsupportedOperationException: Die Java-Laufzeitumgebung (Java Runtime
- Environment, JRE), Version 1.6, wird von diesem Treiber nicht unterstützt. Verwenden
- Sie die Klassenbibliothek 'sqljdbc4.jar', die Unterstützung für JDBC 4.0 bietet.
- at com.microsoft.sqlserver.jdbc.SQLServerConnection.<init>(SQLServerConnection.java:223)
- at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:840)
- at java.sql.DriverManager.getConnection(Unknown Source)
- at java.sql.DriverManager.getConnection(Unknown Source)
- at msSqlTest.DB.dbConnect(DB.java:13)
- at msSqlTest.TestConnection.main(TestConnection.java:7)
- import java.sql.*;
- public class TestConnection{
- public static void main(String[] args){
- // Neue DB und los geht's :)
- DB db = new DB();
- db.dbConnect("jdbc:sqlserver://localhost:1433/muff", "user", "pw" );
- }
- }
- class DB{
- public void dbConnect( String db_connect_string,
- String db_userid,
- String db_password){
- try{
- Class.forName( "com.microsoft.sqlserver.jdbc.SQLServerDriver" );
- Connection conn = DriverManager.getConnection(
- db_connect_string,
- db_userid,
- db_password);
- System.out.println( "connected" );
- }
- catch( Exception e ){
- e.printStackTrace();
- }
- }
- };
- ResultSet objResultSet = objPreparedStatement.getResultSet();
- if (objResultSet == null) {
- boolean bResult = false;
- while (!bResult){
- if (objPreparedStatement.getMoreResults()){
- objResultSet = objPreparedStatement.getResultSet();
- bResult = true;
- }
- }
- }
- objCachedRowSet = new CachedRowSetImpl();
- objCachedRowSet.populate(objResultSet);
- if (CommonUtility.isValidObject(objResultSet)) objResultSet.close();
- objResultSet = null;
- db.dbConnect("jdbc:sqlserver://localhost:1433/muff", "user", "pw" );
- db.dbConnect("jdbc:sqlserver://localhostmuff", "user", "pw" );
- db.dbConnect("jdbc:sqlserver://localhost:1433", "user", "pw" );
- db.dbConnect("jdbc:sqlserver://localhost", "user", "pw" );
Add Comment
Please, Sign In to add comment