gpt4 book ai didi

vbscript - ASP Classic VB 错误 800a01a8 需要对象

转载 作者:行者123 更新时间:2023-12-02 21:34:27 25 4
gpt4 key购买 nike

我正在尝试解决公司网站上的问题。有问题的页面是 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">&nbsp;</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">&nbsp;</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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com