title: pyodbc connection failing in sqlalchemy but working through direct pyodbc connection
body: <p>Why does this workc(I get a result set back):</p>
  <pre><code>sql_server = 'myserver.database.windows.net'
  sql_database = 'pv'
  sql_username = 'sqladmin'
  sql_password = 'password1'   
  sql_driver= '{ODBC Driver 17 for SQL Server}'
  
  with pyodbc.connect('DRIVER='+sql_driver+';SERVER=tcp:'+sql_server+';DATABASE='+sql_database+';UID='+sql_username+';PWD='+ sql_password) as conn:
      with conn.cursor() as cursor:
          cursor.execute(&quot;SELECT TOP 3 SAPPHIRE_CASE_ID FROM PV_ALL_SUBMISSIONS_SL&quot;)
          row = cursor.fetchone()
          while row:
              print (str(row[0]))
              row = cursor.fetchone()
  </code></pre>
  <p>But this fails:</p>
  <pre><code>import pyodbc
  sql_engine = sqlalchemy.create_engine(f'mssql+pyodbc://{sql_username}:{sql_password}@{sql_server}/{sql_database}?driver=ODBC+Driver+17+for+SQL+Server')
  df.to_sql('PV_ALL_CLOSED_CASES_SL', con=sql_engine, if_exists='append')
  </code></pre>
  <p>Error is:</p>
  <blockquote>
  <p>OperationalError: (pyodbc.OperationalError) ('08001', '[08001]
  [Microsoft][ODBC Driver 17 for SQL Server]Named Pipes Provider: Could
  not open a connection to SQL Server [53].  (53) (SQLDriverConnect);
  [08001] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout
  expired (0); [08001] [Microsoft][ODBC Driver 17 for SQL Server]A
  network-related or instance-specific error has occurred while
  establishing a connection to SQL Server. Server is not found or not
  accessible. Check if instance name is correct and if SQL Server is
  configured to allow remote connections. For more information see SQL
  Server Books Online. (53)') (Background on this error at:
  https://sqlalche.me/e/14/e3q8)</p>
  </blockquote>
  <p>While I know one is doing a read and the other a write, my issue seems to be just establishing a connection one way vs another, when using the same connection details.  It isn't an Azure firewall issue as I am able to connect and run a select statment via the first method, but when using create_engine() of sqlalchemy, it fails to make the connection - but I am pretty sure the connection string is correct.</p>
  <p>It is the same variables for server, user name and password being used in both connections.</p>
  <p>I think the issue is that the real password as an &quot;@&quot; symbol in it, and so this interferes with the latter connection string.</p>