数据库是 sql server
iserver版本:SuperMap iServer 11i(2024) (11.2.0-win64)
请求的时候报错:SQL contains the illegal characters or expressions the server specified
但是我的请求参数没有发现啥特殊的,更加奇怪的是,同样的请求,参数值不一样,有几个还是好的,大部分都报这个错,这个大概是什么原因呢?
http://XXX.XXXXXXX.cn:XX/iserver/services/map-Testlx/rest/maps/maproad/queryResults.jsonp?
报错的:
requestEntity:
{'queryMode':'SqlQuery','queryParameters':{'customParams':null,'expectCount':100000,'networkType':"LINE",'queryOption':"ATTRIBUTEANDGEOMETRY",'queryParams':[{'name':"GHXML_SDBK@mapdata",'attributeFilter':"(GYDWDM = '1420425' and XM0101 = '20231420425008')",'orderBy':"XM0101 asc",'joinItems':null,'linkItems':null,'ids':null,'groupBy':null,'fields':null}],'startRecord':0,'prjCoordSys':null,'holdTime':10,'returnCustomResult':false}}
返回结果为:"error": {
"code": 400,
"errorMsg": "SQL contains the illegal characters or expressions the server specified"
}
不报错的:
requestEntity:
{'queryMode':'SqlQuery','queryParameters':{'customParams':null,'expectCount':100000,'networkType':"LINE",'queryOption':"ATTRIBUTEANDGEOMETRY",'queryParams':[{'name':"GHXML_SDBK@mapdata",'attributeFilter':"(GYDWDM = '1420829' and XM0101 = '20201420829Z02')",'orderBy':"XM0101 asc",'joinItems':null,'linkItems':null,'ids':null,'groupBy':null,'fields':null}],'startRecord':0,'prjCoordSys':null,'holdTime':10,'returnCustomResult':false}}
说明:以前iserver10的时候,没有问题,升级到iserver11后新出现的。