GDAL ODBC (MS Access driver), can't deal with table names that have spaces
|Reported by:||robe||Owned by:||warmerdam|
I tested this on GDAL 2.1.3, GDAL 2.2.1, and GDAL 2.2.3 and all seemed to have the same issue.
This is under windows 7 64-bit
# This correctly gives list of layers
ogrinfo "C:\Temp\test.mdb" INFO: Open of `C:\Temp\test.mdb' using driver `ODBC' successful. 1: a table 2: test
#But when I try to query the table that has spaces in name, I get this
ogrinfo "S:\Temp\test.mdb" "a table" INFO: Open of `C:\Temp\test.mdb' using driver `ODBC' successful. Layer name: a table Geometry: Unknown (any) ERROR 1: GetFeatureCount() failed on query SELECT COUNT(*) FROM a table. [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause. Feature Count: 0 Layer SRS WKT: (unknown) ID: Integer (10.0) A Number: Integer (10.0) A Text: String (255.0)
Attached Is sample database I was using to troubleshoot the problem.