SQL Connection with public IP, named instance and port number

后端 未结 4 1017
盖世英雄少女心
盖世英雄少女心 2020-12-16 19:15

I have had difficulty creating a connection string in c# that will connect to a remote SQL server using a public IP, named instance and a port number (other than 1433). Anyo

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-16 19:52

    connectionString="Database=pub;Server=192.168.1.1\INSTANCE,1746;Trusted_Connection=yes;"
    

    Or you could use username/password instead of trusted connection.

提交回复
热议问题