Can you help me, please? I'm trying to create an Android app, which will connect to SQL Server Database. I'm using JDBC driver and:
- Added JDBC in Projects Setting -> Library (shown in External Libraries)
The code of connecting to DB is as follows:
try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String url = "jdbc:sqlserver://xxx.x.x.x:yyyy;integratedSecurity=true;" con = DriverManager.getConnection(url); if (con != null) { tv.setText("Connected"); } else { tv.setText("Not connected"); } catch (Exception ex) { tv.setText("" + ex); }
Eventually, I receive an Exception, that Driver com.microsoft.jdbc.SQLServerDriver not found
If I run the same Console app on Java app, it works.