I solved this error with enabling tcp/ip for the MS sql server I am tring to connect to
//1. open sql server configuration manager where you can view all the MS server insatnces
//2. Then go to Sql Server Configuration Manager > SQL Server Network Configuration > Protocols for SQLSERVER > TCP/IP
//3. enable tcp/ip