How can I change password for sql login to database using pyodbc?
问题 I try change password for sql login to database using pyodbc in python But I get error - Wrong syntax near object "@P1" (102) (SQLExecDirectW).....Cannot prepare the instruction (8180) config.login = 'user' config.haslo = '12345' haslo = 'abcde' con = pyodbc.connect("DRIVER={ODBC Driver 11 for SQL Server};" "SERVER=Serwer;" "DATABASE=Baza;" "UID="+config.login+";" "PWD="+config.haslo+";" "autocommit=true") kursor = con.cursor() zapytanie = """ALTER LOGIN ? with password = ? old_password = ?""