Can you share the C# code that successfully connects to the DB?
Try
conn = OpenSQLConnection[ JDBC["Microsoft SQL Server(microsoft)", "(LcalDB)\\MSSQLLocalDB"], "Catalog" -> "StockDataDB", "instance" -> "LOCALDB#B5C431B2"]
Are you sure this is correct
Server: (LcalDB)\MSSQLLocalDB
Is it LocalDB and not LcalDB?
LocalDB
LcalDB