Skip to content

Commit

Permalink
Fix mssql driver attribute conversion (#5702)
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Dec 9, 2018
1 parent 505539f commit ffb1191
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mapmssql2008.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1105,10 +1105,9 @@ static int prepare_database(layerObj *layer, rectObj rect, char **query_string)
/* adding items to the select list */ /* adding items to the select list */
for (t = 0; t < layer->numitems; t++) { for (t = 0; t < layer->numitems; t++) {
#ifdef USE_ICONV #ifdef USE_ICONV
/* no conversion applied at the database */ query = msStringConcatenate(query, "convert(nvarchar(max), [");
query = msStringConcatenate(query, "[");
query = msStringConcatenate(query, layer->items[t]); query = msStringConcatenate(query, layer->items[t]);
query = msStringConcatenate(query, "],"); query = msStringConcatenate(query, "]),");
#else #else
query = msStringConcatenate(query, "convert(varchar(max), ["); query = msStringConcatenate(query, "convert(varchar(max), [");
query = msStringConcatenate(query, layer->items[t]); query = msStringConcatenate(query, layer->items[t]);
Expand Down

0 comments on commit ffb1191

Please sign in to comment.