请大家帮忙看看这个代码哪有问题,导致CPU100%!

由于字数限制 所以我得发两次请大家注意!======================================<%If Not IsNumeric(Request("NewsId")) And Request("NewsId") <> "" then Response.write"错误的系统参数!NewsId必须是数字" Response.endElse NewsId = CLng(Request.querystring("NewsId"))End IfSet Rs=Server.CreateObject("ADODB.RecordSet")Sql="Select CataId,Gjc From News Where NewsId="&NewsIdRs.Open Sql,Conn,1,1If Not Rs.Eof ThenGjc=Rs("Gjc")CataId=Rs("CataId")%><table width="607" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="607" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/news_tj1.gif" width="607" height="38"></td> </tr> <tr> <td height="127" align="left" valign="bottom" background="images/news_tj2.gif"><table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="285" height="137" align="right" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="6"></td> </tr> </table><⼀tr> <⼀table> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="6"><⼀td> <⼀tr> <⼀table> <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#66CCFF"> <tr><⼀tr> <⼀table> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="6"><⼀td> <⼀tr> <⼀table><⼀td> <⼀tr><⼀table><%End IfCall RsClose()%>
2026年09月27日 16:29
有1个网友回答
网友(1):

首先Set Rs=Server.CreateObject("ADODB.RecordSet")后面缺少ODBC数据库连接,就是那个字符串"Driver={Microsoft Access Driver (*.mdb)};DBQ=X:/../xxx.xxx;password="

Call RsClose() 应该是 Call Rs.Close()