MS SQL Server driver - Attribute table empty after using Query builder #15183
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
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
The text was updated successfully, but these errors were encountered: