I am able to connect to server with mssql management studio but not able to connect using python I think some problem in connection string please help below is string I am using.
import pyodbc as p
connStr = ( r'DRIVER={SQL Server};Server=ip; Network=DBMSSOCN;Initial Catalog=' + database + ';User ID=' + id +';Password=' + pass1 +';Trusted_Connection=True' +';')
conn = p.connect(connStr)
error is like below
conn = p.connect(connStr)
pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][TCP/IP Sock
ets]SQL Server does not exist or access denied. (17) (SQLDriverConnectW); [01000
] [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
(10060); [01S00] [Microsoft][ODBC SQL Server Driver]Invalid connection string a
ttribute (0)')