作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试解决公司网站上的问题。有问题的页面是 http://www.srbc.com/SiteMap.asp 。尝试调用全局选项文件时出现以下错误:
Microsoft VBScript runtime error '800a01a8' Object required: '' /_Includes/Callout_Global.asp, line 40
这是/_Includes/Callout_Global.asp 文件中错误引用的行:
rs_main.open "Select TeamID, FirstName + ' ' + LastName as FullName from team where Category = 'Attorney' and IsActive = '1' Order by OrderNum"
该代码控制应包含律师姓名列表的下拉框。
此代码在网站的其他页面上运行得很好(例如 http://www.srbc.com/Careers/Default.asp )。
我不是编码员,只是想稍微清理一下这个网站。这是相当过时的代码,但是任何有关我可以采取哪些措施来解决此问题的建议将不胜感激。
SiteMap.asp 页面上调用此函数的代码如下所示:
<td width="210" valign="top" class="hideforprint">
<!--#include virtual="/_Includes/Callout_Global.asp" -->
</td>
<td width="20"> </td>
</tr>
</table>
<table width="726" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"></td>
</tr>
</table>
</td>
<td width="22" valign="top" background="/Images/CommonImages/rightborder.gif"> </td>
</tr>
</table>
<!--#include virtual="/_Includes/Footer.asp" -->
</body>
</html>
谢谢!
最佳答案
该错误表明您尚未创建名为 rs_main
的对象。看起来它应该是一个记录集对象,因此您在代码的前面应该有该行
Set rs_main = Server.CreateObject("ADODB.Recordset")
您能贴出 Callout_Global.asp 的前 40 行吗,可能还缺少其他内容?
关于vbscript - ASP Classic VB 错误 800a01a8 需要对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29901536/
我是一名优秀的程序员,十分优秀!