I have a java program(For android app) that connects to a MS SQL SERVER 2005 database. I get an error when I run it through eclipse:
java.sql.SQLException: Network error IOException:Permission denied
I am using jtds to connect:
String connString = "jdbc:jtds:sqlserver://localhost/DB_CHITS_MANAGER;user=sa;password=123456;instance=SQLEXPRESS;";
String username = "sa";
String password = "123456";
conn = DriverManager.getConnection(connString,username,password);
Statement stmt = conn.createStatement();
ResultSet reset = stmt.executeQuery("select * from tb_branch");
I stopped firewall,enable tcp-ip in sql server,set the port as 1433. But its didn't work for me. the database name is the same. No mistake in that. Pls help me...