Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StrictMode.ThreadPolicy policy = new
- StrictMode.ThreadPolicy.Builder().permitAll().build();
- StrictMode.setThreadPolicy(policy);
- Connection connection = null;
- String ConnectionURL = null;
- String ConnExample;
- try
- {
- Class.forName("net.sourceforge.jtds.jdbc.Driver");
- ConnectionURL = "jdbc:jtds:sqlserver://" + server + database + ";user=" + user+ ";password=" + password + ";";
- connection = DriverManager.getConnection(ConnectionURL);
- String flag = "flag";
- }
- catch (SQLException se)
- {
- Log.e("error 1 : ", se.getMessage());
- }
- catch (ClassNotFoundException e)
- {
- Log.e("error 2 : ", e.getMessage());
- }
- catch (Exception e)
- {
- Log.e("error 3 : ", e.getMessage());
- }
- return connection;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement