title: CREATE TABLE with DECIMAL column using Access ODBC
body: <p>I am using pypyodbc module to create a database and add a table in it.</p>
  
  <p>The code I use is the following:</p>
  
  <pre><code>import pypyodbc
  pypyodbc.win_create_mdb('D:\\test.mdb')
  connection_string = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=D:\\test.mdb'
  connection = pypyodbc.connect(connection_string)
  SQL = "CREATE TABLE [test] ([FID] INT,[AREA] FLOAT,[CODE] VARCHAR(10),[X_CO] DECIMAL(10,3));"
  connection.cursor().execute(SQL)
  connection.commit()
  connection.close()
  </code></pre>
  
  <p>The above code creates the database but it produces an error when it goes to create the table. The error is the following:</p>
  
  <blockquote>
    <p>ProgrammingError: (u'42000', u'[42000] [Microsoft] [ODBC Microsoft Access Driver] Syntax error in defining field.</p>
  </blockquote>
  
  <p>From searching the web I found out that the problem is with the DECIMAL type of the last field and when I remove it from the query, it creates the table.</p>
  
  <p>I also tried to change an option in Access to make the database compatible with ANSI 92 and when I did it, the table could be created from inside Access.</p>
  
  <p>Because this process must be done hundreds of databases, I would like to do this in a python loop but for this to happen, the creation of the database and the table must be done from the above code.</p>
  
  <p>Am I missing something in the syntax?
  Does anyone know if this is a problem of the module?</p>