title: Python: Write Pandas Dataframe to MSSQL --> Database Error
body: <p>I have a pandas dataframe that has about 20k rows and 20 columns.  I want to write it to a table in MSSQL. </p>
  
  <p>I have the connection successfully established: </p>
  
  <pre><code>connection = pypyodbc.connect('Driver={SQL Server};' 
                                'Server=XXX;' 
                                'Database=line;' 
                                'uid=XXX;' 
                                'pwd=XXX')
  
  cursor = connection.cursor()
  </code></pre>
  
  <p>I'm trying to write my pandas dataframe to the MSSQL server with the following code: </p>
  
  <pre><code>df_EVENT5_16.to_sql('MODREPORT', connection, if_exists = 'replace')
  </code></pre>
  
  <p>But I get the following error: </p>
  
  <blockquote>
    <p>DatabaseError: Execution failed on sql 'SELECT name FROM sqlite_master
    WHERE type='table' AND name=?;': ('42S02', "[42S02] [Microsoft][ODBC
    SQL Server Driver][SQL Server]Invalid object name 'sqlite_master'.")</p>
  </blockquote>