I'm trying to convert closed polylines into polygons using ogr2ogr from dxf to mssql. [Here](http://www.gdal.org/drv_dxf.html) it says that polylines are converted into POLYGON if they are closed, but I always get the type LINESTRING instead of POLYGON in the geometry type column. I also tried to convert DXF into Shapefile and into a MySQL database with same results. Converting Shapefiles with polygons into databases works well, so I think the problem is in the gdal dxf driver.

Can someone explain me what am I doing wrong?

Here is the command I'm running

ogr2ogr -update -append -f MSSQL "MSSQL:server=.
\SQLEXPRESS;database=testdb;trusted_connection=yes" test.dxf