Background: My local MS SQL database is configured as following: TCP/IP disabled with dynamic port (default setting)
When using .Net to connect to my local database, I don't need to enable TCP connection in SQL Server Configuration Manager or specifying the port number in connection string. I just need to put this in app.config
<add name="MyDatabase" connectionString="Initial Catalog=MyDatabase;Data Source=localhost\SQLEXPRESS;Integrated Security=SSPI;"/>
However, I have to enable TCP in order to connect to it using JDBC. I wonder whether there is any way to get around it?