Why the mssql object can not be identified?

瘦欲@ 提交于 2019-12-11 09:33:38

问题


I am getting below error when using mssql object in script as:

var mssql =request.services.mssql;

Log entry details

ERROR

Error in script '/api/apitest.js'. TypeError: Cannot read property 'mssql' of undefined at exports.get (D:\home\site\wwwroot\App_Data\config\scripts\api\apitest.js:3:31) [external code]

Please suggest.

Thanks


回答1:


Your problem seems to be a typo: it's request.service.mssql, not request.services.mssql as you have in your question (there's no s at the end of service). Try using the appropriate property name and you should be able to get to the mssql object.



来源:https://stackoverflow.com/questions/28264430/why-the-mssql-object-can-not-be-identified

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!