title: Neither DSN nor SERVER keyword supplied
body: <p>I am trying to connect to SQL database slightly different ways: with and without use of parameter. Why without use of parameters works fine, but with use of parameters - gives me an error. 
  Did I make a syntax error? 
  I went through each letters and couldn't see anything. </p>
  
  <pre><code>import pandas as pd
  import pyodbc
  
  #parameters:
  server = 'SQLDEV'
  db = 'MEJAMES'
  
  #Create the connection
  conn = pyodbc.connect('DRIVER={SQL Server};server =' + server + ';DATABASE = ' + db + ';Trusted_Connection=yes;')
  # query db
  sql = """
  
  select top 10 PolicyNumber, QuoteID, ProducerName from tblQuotes
  
  """
  df = pd.read_sql(sql,conn)
  df
  </code></pre>
  
  <p>The statement above gives me an error <a href="https://i.stack.imgur.com/ZArfe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZArfe.png" alt="enter image description here"></a></p>
  
  <p>But if I do the same but without use of parameters then it works fine:</p>
  
  <pre><code>import pandas as pd
  import pyodbc
  
  #parameters:
  #server = 'SQLDEV'
  #db = 'MEJAMES'
  
  #Create the connection
  conn = pyodbc.connect("DRIVER={SQL Server};server=SQLDEV;database=MEJAMES;Trusted_Connection=yes;")
  # query db
  sql = """
  
  select top 10 PolicyNumber, QuoteID, ProducerName from tblQuotes
  
  """
  df = pd.read_sql(sql,conn)
  df
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/njGIK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/njGIK.png" alt="enter image description here"></a></p>