title: Python-Microsoft SQL Insert Variables into Table
body: <p>There is a working request:</p>
  
  <pre><code>MSQSLQuferty1="""INSERT INTO dbo.Users VALUES('namedd188','logindd188','passworddd',0)"""
  cursor.execute(MSQSLQuferty1)
  </code></pre>
  
  <p>But if you pass parameters through variables, an error occurs.</p>
  
  <pre><code>name1="ur2241"
  login1="login2241"
  password1="password2241"
  voises1="0"
  
  cursor.execute("INSERT INTO dbo.Users(name,login,password,Voited) VALUES (%s,%s,%s,%s);"%(name1,login1,password1,voises1))
  </code></pre>
  
  <p>Traceback (most recent call last):</p>
  
  <blockquote>
    <p>File "E:/Dropbox/Pyton/Network/Client-Server/Server/SQLConnect.py",
    line 33, in 
        cursor.execute("INSERT INTO dbo.Users(name,login,password,Voited) VALUES (%s,%s,%s,%s);"%(name1,login1,password1,voises1))   File
    "E:\Pyton\lib\site-packages\pypyodbc-1.3.4-py3.6.egg\pypyodbc.py",
    line 1626, in execute   File
    "E:\Pyton\lib\site-packages\pypyodbc-1.3.4-py3.6.egg\pypyodbc.py",
    line 1652, in execdirect   File
    "E:\Pyton\lib\site-packages\pypyodbc-1.3.4-py3.6.egg\pypyodbc.py",
    line 1007, in check_success   File
    "E:\Pyton\lib\site-packages\pypyodbc-1.3.4-py3.6.egg\pypyodbc.py",
    line 975, in ctrl_err pypyodbc.ProgrammingError: ('42S22', '[42S22]
    [Microsoft][ODBC SQL Server Driver][SQL Server]Недопустимое имя
    столбца "ur2241".')</p>
  </blockquote>