为什么MSSQL对象不能被识别? [英] Why the mssql object can not be identified?

查看:159
本文介绍了为什么MSSQL对象不能被识别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在脚本中使用MSSQL对象时收到以下错误:

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

var mssql =request.services.mssql;

日志条目详细信息

Log entry details

错误

在脚本错误/api/apitest.js。类型错误:无法读取属性
  MSSQL未定义
      在exports.get(D:\\家\\网站\\ wwwroot的\\ App_Data文件\\设置\\脚本\\ API \\ apitest.js:3:31)
      [外部code]

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]

请建议。

感谢

推荐答案

您的问题似乎是一个错字:它的 request.service.mssql ,而不是 request.services.mssql ,你在你的问题有(有没有的取值是在年底服务) 。尝试使用适当的属​​性名称,你应该能够获得的 MSSQL 对象。

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.

这篇关于为什么MSSQL对象不能被识别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆