I am looking for a solution for inserting CSV file to SQL Server and for inserting data to SQL Server I faced with below error. I read lot about this issue and did several changes but nothing happened and still I can't import csv to relative table. I can't understand why this error also happened?
Microsoft SQL has been installed on my local computer:
conn = pyodbc.connect('Driver=SQL Server; Server=ServerName\MSSQLSERVER; Database=DBName;Trusted_Connection=yes ; UID=Administrator')
Error:
pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBMSLPCN]Invalid connection. (14) (SQLDriverConnect); [08001] [Microsoft][ODBC SQL Server Driver][DBMSLPCN]ConnectionOpen (ParseConnectParams()). (14)')
'DRIVER={SQL Server};SERVER=....
(missing{}
). – ZhorovTrusted_Connection=yes
without UID or PWD. For SQL Login authentication useUID=YourUsername;PWD=YourPassword
without Trusted_Connection. – AlwaysLearning