i look for solution that i try to make connection between sql server and pythoon but i get error
driver_name = 'SQL Server'
server_name = 'local'
database_name= 'sample'
connection_srting=f"""
driver = {driver_name};server = {server_name};database={database_name};trusted_connection=yes
"""
conn=pyodbc.connect(connection_srting)
print(conn)
error msg :
Traceback (most recent call last):
File "c:\Users\ny\print('hellow').py", line 29, in <module>
conn=pyodbc.connect(connection_srting)
pyodbc.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no def
ault driver specified (0) (SQLDriverConnect)')

あなたの回答
tips
プレビュー