Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
MSSQL Driver no longer returns correct attributes #5702
As noted in the comments here any non-string fields in a layer using the msplugin_mssql2008.dll plugin are returned as nulls or garbage when accessing via a WFS (string fields appear to be fine).
This is the same using either "gml_types" "auto" or manually setting the types.
It is also the case when using MapScript and trying to get a shapeObj attribute - they appear empty in the most recent version.
Not sure how best to make a test case as it requires a MSSQL database. I may try to see if this is something that can be easily added to Appveyor.
From debugging there are the following debug errors in the logs:
These are caused on line 1813 in mapmssql2008.c:
I though it may be a data issue, but this is also caused on a very simple table such as:
Hi @szekerest - I have created a sample Mapfile and SQL to recreate the issue in a repository at https://github.com/geographika/mapserver-mssql-test/
The output2.xml shows the issue - no integer values are returned. The 7.0 release works fine, but I can't see any recent updates that would cause it.
My sql.h file when debugging is in
referenced this issue
Nov 19, 2018
added a commit
Dec 9, 2018
@szekerest - many thanks for that. I've recompiled and tested and all is now fine. As I understand it the if clause is there to use ASCII strings (varchar) when ICONV support is not present, and to use Unicode strings (nvarchar) when it is.
In the original update there was a comment