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

MS SQL Server driver - Attribute table empty after using Query builder #15183

Closed
qgib opened this issue May 16, 2012 · 1 comment
Closed

MS SQL Server driver - Attribute table empty after using Query builder #15183

qgib opened this issue May 16, 2012 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented May 16, 2012

Author Name: Carlos da Ponte (Carlos da Ponte)
Original Redmine Issue: 5610
Affected QGIS version: master
Redmine category:data_provider/mssql
Assignee: Tamas Szekeres


After using the MS SQL Server driver and the query builder to filter the imported layer/table, the attribute table is empty, noting at the top that that "0/0 features selected". If I then select a feature the attribute table remains empty. If I then remove the query, the attribute table repopulates.

This may be related but I was receiving the following error when using the query builder:
_
An error occurred when executing the query.
The data provider said:
[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt QODBC3: Unable to execute statement_

I identified that this only happened when I used the "Sample" button to return values associated with the selected field in the query builder form. I realized that this was the issue when I read this:

_This is caused by having an open result set open against the same connection. For example, you execute a SqlCommand to select all rows from a table, while the result set is not drained, you try to execute another SqlCommand using the same connection, you will hit this error message.

To solve this, you have two choices:
a. Make sure you read the rest data from the pending result set before you send the next SqlCommand.
b. Use MARS (Multiple Active ResultSet) connection setting to enable multiple active result set in a connection. See http://msdn2.microsoft.com/en-us/library/ms345109.aspx
for more details.

_

Thanks!
Carlos

@qgib
Copy link
Contributor Author

qgib commented Jun 3, 2012

Author Name: Tamas Szekeres (@szekerest)


Fixed in changeset "2519df85ffdc0917e105846e1b6bb4006408bca7".


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers labels May 24, 2019
@qgib qgib added this to the Version 1.8.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
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! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

1 participant