GDAL MSSQL with numeric table names

المشرف العام

Administrator
طاقم الإدارة
I have many SHP tables organised by year, for example 2015_xx_data.shp that I have loaded into a MS SQL Server database using OGR2OGR. I have also loaded them into MySQL for a comparison. There are no problems with the MySQL database but I am unable to get any features from the MSSQL database using OGRINFO.

I am using SQL Server 2014 Management Studio.

I understand that the table names really should not start with a numeric and would need to be qualified with quotes or [] in this case. But the GDAL MSSQL driver does not seem to work quite right here.

*** QRY 1: If I use this syntax I get the Feature Count 0 and the correct SRS being reported, the fields being reported but no data is output:

ogrinfo -al "MSSQL:server=xxx\xxx;database=spatialtest;trusted_connection=yes;tables=dbo.2015_xx_data" INFO: Open of MSSQL:server=xxx\xxx;database=spatialtest;trusted_connection=yes;tables=dbo.2015_xx_data' using driverMSSQLSpatial' successful.


Layer name: 2015_xx_data Geometry: Line String Feature Count: 0
 
أعلى