Sponsored Links
Hi I wrote java code that connects remote sql server. But code does not work in android. Code is as follows: try { DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver()); String url="jdbc:sqlserver://hostname"; Connection conn=DriverManager.getConnection (url,"username","password"); Statement stmt=conn.createStatement(); DatabaseMetaData meta = conn.getMetaData(); if (conn != null) { txt.setText("Conection Succesful"); } } catch(SQLException se) { System.out.println("ERROR: " + se.getMessage()); } And log is follows: 08-22 17:32:40.777: ERROR/AndroidRuntime(17582): java.lang.VerifyError: com.microsoft.sqlserver.jdbc.SQLServerConnection 08-22 17:32:40.777: ERROR/AndroidRuntime(17582): at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect (SQLServerDriver.java:840) --~--~---------~--~----~------------~-------~--~----~