Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSSQL Invalid layer #28427

Closed
qgib opened this issue Nov 23, 2018 · 6 comments
Closed

MSSQL Invalid layer #28427

qgib opened this issue Nov 23, 2018 · 6 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers MS SQL data provider Regression Something which used to work, but doesn't anymore stale Uh oh! Seems this work is abandoned, and the PR is about to close.

Comments

@qgib
Copy link
Contributor

qgib commented Nov 23, 2018

Author Name: Zannis Kostalas (Zannis Kostalas)
Original Redmine Issue: 20607
Affected QGIS version: 3.4.1
Redmine category:data_provider/mssql


The case:
On the same server, created an exact copy of a polygon table on a different db
SELECT * INTO db2.dbo.geom_table_copy FROM db1.dbo.geom_table

While QGIS was reading the original table normally, when attempting to insert the copied table I would get
"WARNING dbname='db2' host=www.myhost.com user='user' password='pwd' srid=4326 type=Polygon disableInvalidGeometryHandling='0' table="dbo"."geom_table_copy" (POLYGON) sql= is an invalid layer - not loaded"

The problem got solved when I populated the "sql" field on the table selection with a random, valid query, loaded the table and then deleted the query. As it seems, for some reason, when creating the connection to the 2nd db, that field, enev though appearing blank, was populated in the background with an invalid expression (that's my best guess at least)

Once you know how to fix it it's easy but this was bugging me for close to 6 months now and no solution exists on the internet

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2018

Author Name: Giovanni Manghi (@gioman)


Does it works as expected on 2.18?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Nov 28, 2018

Author Name: Zannis Kostalas (Zannis Kostalas)


Giovanni Manghi wrote:

Does it works as expected on 2.18?

QGIS 2.18.15 loads the layers properly

@qgib
Copy link
Contributor Author

qgib commented Nov 28, 2018

Author Name: Giovanni Manghi (@gioman)


  • regression was changed from 0 to 1
  • priority_id was changed from Normal to High
  • status_id was changed from Feedback to Open

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Data Provider Related to specific vector, raster or mesh data providers Regression Something which used to work, but doesn't anymore labels May 25, 2019
@gioman gioman changed the title MSsql Invalid layer MSSQL Invalid layer Aug 4, 2020
@gioman gioman added MS SQL data provider and removed Data Provider Related to specific vector, raster or mesh data providers labels Dec 28, 2020
@alexbruy
Copy link
Contributor

alexbruy commented Aug 8, 2023

Is this still an issue with latest master?

@alexbruy alexbruy added the Feedback Waiting on the submitter for answers label Aug 8, 2023
@github-actions
Copy link

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Aug 23, 2023
@github-actions
Copy link

While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue.
Or, if you have any further questions, there are also further support channels that can help you.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers MS SQL data provider Regression Something which used to work, but doesn't anymore stale Uh oh! Seems this work is abandoned, and the PR is about to close.
Projects
None yet
Development

No branches or pull requests

3 participants