writing dataframe to sql server
#### Code Sample, a copy-pastable example if possible

```python
# Your code here
import pandas as pd
import pyodbc
import csv
server = '10.7.8.4' 
database = 'RESTDATA' 
username = 'ABC' 
password = 'ABC@ABC'
Table_Name='CSVSQL2_TEST'


df=pd.read_csv("D:\\data\\1.csv",skiprows=31)
 

cnxn=pyodbc.connect('DRIVER={ODBC Driver 13 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
data=df[['Inspection Date Time','Job Serial Number','Layout','RUNOUT','DIA','Shift']]
df.to_sql(name='CSVSQL2_TEST',con=cnxn,index=False)

```
#### Problem description
While I am trying to write the dataframe to the sql Server using pandas it throws an error. The error says database error 


#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.6.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.23.4
pytest: None
pip: 18.1
setuptools: 40.5.0
Cython: 0.29
numpy: 1.15.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.0.1
sphinx: None
patsy: None
dateutil: 2.7.4
pytz: 2018.6
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: 2.5.9
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None




</details>
