The geometry column POINT in the View (not Table) View_MyGeometry is generated in the SQL database GeoData with Microsoft SQL Server Management Studio. QGIS recognizes this column as a geometry column in the menu Layer > Add Layer > Add MSSQL Spatial Layer .... I then manually give Point for Type and 2056 for SRID and continue with the button Add. However, QGIS then returns the error message
dbname='GeoData' host=[...] srid=2056 type=Point disableInvalidGeometryHandling='0' table="dbo"."View_MyGeometry" (Point) is an invalid layer - not loaded
Unfortunately, the option Vector > Geometry Tools > Check Validty (invalid geometry case) can not be applied as the desired column is not loaded into QGIS at all.
What might be the reason that the geometry column is not valid? Is there already a problem, that Type and SRID are not automatically recognized?
Technical data:
- SQL Server: Microsoft SQL Server Standard (64-bit) SQL Server, version 14.0.2027.2
- Microsoft SQL Server Management Studio: version 15.0.18206.0
- QGIS: version 3.16.11-Hannover
