title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | apilocation | apiname | apitype |
---|---|---|---|---|---|---|---|---|---|---|
getPortNumber Method (SQLServerDataSource) |
getPortNumber Method (SQLServerDataSource) |
David-Engel |
davidengel |
01/19/2017 |
sql |
connectivity |
reference |
sqljdbc.jar |
SQLServerDataSource.getPortNumber |
Assembly |
[!INCLUDEDriver_JDBC_Download]
Returns the current port number that is used to communicate with [!INCLUDEssNoVersion].
public int getPortNumber()
An int value that contains the current port number.
The port number is the TCP/IP port number that is used when opening a socket connection to [!INCLUDEssNoVersion]. If the portNumber property is not set, the getPortNumber method returns the default value of 1433.
Note
The setPortNumber method does not do any range checking on the port value passed in. You can pass tort numbers that are not valid, like 99999, without triggering an error.