Port error tcp ip in java connection with sql server

0

Well, more than problem in the code I think it will be installation but, well, if you can help me, I would greatly appreciate it: It all starts when I have to install sql server 2014 express edition on a client's computer, all right, you can even create database, also open port 1433 in the firewall, both input and output, but when executing the following connection code to make a query in the database which is the following (java):

    package accesoDatos;

import java.sql.*;

public class conexion {
    public static Connection Conectar() throws Exception{
        try {

    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            Connection cn=DriverManager.getConnection("jdbc:sqlserver://ISPL\ISPL:1433;"
                    + "databaseName=TecnoTrony","sa","sql");


            /*
                Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            Connection cn=DriverManager.getConnection("jdbc:sqlserver://ORLANDO-PC:1433;"
                    + "databaseName=TecnoTrony","sa","sql");
            */  

            return cn;


        }catch (Exception e) {

            throw e;

        }

    }
}

When debugging, I returned the typical error that the tcp ip ports are closed or can not connect for any other reason, I stress that the jdk and java version are the same, the .net something that I could not fix I guess that will be the minimum required for sql server 2014, if not otherwise had not installed this same, the only thing I could have forgotten might be to define the port tcp ip in the services manager of sql server, assuming no, that is What may generate this error?

    
asked by isaac cubas 04.12.2018 в 21:17
source

0 answers