QGIS
QGIS copied to clipboard
Autodetection: Data Source Manager no longer autodetects Type and SRID (MS SQL Server) - QGIS 3.32.0
What is the bug or the crash?
When I try to add a new layer using, I connect to my MSSQL server, and it lists all tables. When I double-click a table, I get the following error:
The Type and SRID columns are no longer autodetected. This worked in previous versions of QGIS, such as 3.30.2.
Steps to reproduce the issue
I try to add a new layer using Layer -> Add Layer -> MS SQL.
The connection settings are as follows:
We have tried to check Use estimated table parameters, but it did not seem to affect the autodetection.
I click Connect to the relevant server.
It connects, and lists the database's tables.
Note that one of the Tables is clicked, and appears selected. The Add button is enabled.
Normally, I would double-click the table or select the table click the Add button. Neither work, as I get the error message.
After changing the Type to Polygon and entering 25832 as SRID, I could select the table, marked with blue, and add it as a layer.
Can you bring back the Autodetect feature?
I propose that the error message tells the user that it is not possible to add the layer as it lacks the Type and SRID information.
Versions
The autodetection does not work in 3.32. It did work in previous versions - we tested with 3.22, 3.28, 3.30.3.
--
QGIS version
3.32.0-Lima
QGIS code revision
311a8cb8a6
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.7.0
PROJ version
9.2.1
EPSG Registry database version
v10.088 (2023-05-13)
GEOS version
3.11.2-CAPI-1.17.2
SQLite version
3.41.1
PDAL version
2.5.3
PostgreSQL client version
15.2
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009
Active Python plugins
AddressToolsDK
0.1
Datafordeler
1.3
Dataforsyningen
0.4
DigitizingTools
1.5.2
geosearch_dk
1.4.0
ImportPhotos
3.0.5
db_manager
0.1.20
MetaSearch
0.3.6
processing
2.12.99
Supported QGIS version
- [X] I'm running a supported QGIS version according to the roadmap.
New profile
- [X] I tried with a new QGIS profile
Additional context
This issue may be isolated to MS SQL Server, because our PostGIS server did autodetect the Type and SRID.
Can you check what's in SELECT f_table_schema, f_table_name, f_geometry_column, srid, geometry_type, coord_dimension FROM geometry_columns
for the tables that are not recognized?
Nevermind, that's not used if "Only look in the geometry_columns metadata table" is not checked.