Port not supported for SQL Server
Port not supported for SQL Server
Hi,
I'm trying to connect to a Microsoft SQL Server on a non-standard port, but I experience problems when I'm specifying the port. When I try to connect I receive the following error: Port not supported for SQL Server.
Why isn't it possible to specify a port number? Is there any other way for me to specify the port, because we have numerous situations where the SQL Server isn't listening on the default port.
Thanks.
I'm trying to connect to a Microsoft SQL Server on a non-standard port, but I experience problems when I'm specifying the port. When I try to connect I receive the following error: Port not supported for SQL Server.
Why isn't it possible to specify a port number? Is there any other way for me to specify the port, because we have numerous situations where the SQL Server isn't listening on the default port.
Thanks.
We have analyzed the problem and found out that special keyword for port is not needed. You should set it like this:where 1433 is your port number.
Code: Select all
provider=SQL Server;Data Source=server2, 1433;Initial Catalog=Test;User ID=sa;
Ok, but could you fix the problem anyway? The idea of UniDirect is to be a transparent layer to all DBMS, it'd be kind of stupid to have to deal with this Port anomaly for MSSQL specifically. It'd be better if we could just set the Port property of the UniConnection and your library would take care of setting up the connection string properly.