所需对象:“服务器”来自服务器.MapPath
我正在将 asp 文件转换为 vbs 的过程中,遇到了一个主要问题
我收到错误的行很简单,是代码的第一行
sDBName = Server.MapPath("../mydatabase.accdb" )
返回
Microsoft VBScript 运行时错误:需要对象“服务器”
asp 代码页正常运行时工作正常,我理解需要从 Server.CreateObject 等中删除“服务器”,但我知道应该允许 Server.MapPath
我还有另一个涉及 Provider ACE.OLEDB.12 的问题......但从这个论坛意识到问题是我使用的是 x64 windows 2003 服务器。不过,“cscript”修复在这种情况下没有帮助。
请帮助
戴夫
I am in the process of converting an asp file into vbs and I am hitting a major problem
The line I am getting the error in is simple and is the first line of code
sDBName = Server.MapPath("../mydatabase.accdb")
returns
Microsoft VBScript runtime error: Object required 'Server'
The asp code page works fine when run as normal and I understand the need to remove "Server" from the likes of Server.CreateObject but I know that Server.MapPath should be allowed
I had another problem involving the Provider ACE.OLEDB.12.... but from this forum realised the problem was that I am using a x64 windows 2003 server. The "cscript" fix has not helped in this instance though.
PLEASE PLEASE HELP
Dave
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Server
对象是 ASP 脚本环境的一部分,通常不可用于独立的 VBS 脚本。此外,
MapPath()
方法是针对 Web 应用程序在服务器上的物理位置使用的,对于独立的 VBS 脚本没有意义。The
Server
object is part of the ASP scripting environment and isn't generally available for stand-alone VBS scripts.Also, the
MapPath()
method is used with respect to a web application's physical location on a server, and doesn't make sense for stand-alone VBS scripts.