谁能帮我改改这段代码啊

来源:百度知道 编辑:UC知道 时间:2024/06/15 19:58:17
这段代码里有错
<%
<br> dim k
<br> k=cint(Request.QueryString("a"))
<br> k=request("a")
<br> if k="" or isnumeric(k)=false then
<br> response.end
<br> end if
<br>
<br>
<br> set ODBCReader=Server.CreateObject("ADODB.Recordset")
<br>set ODBCReader=conn.execute("SELECT questionid,questionclass,questiontitle,questionfile FROM question where questionid="k" and questionif="否"")
<br>
<br>
<br>
<br>%>
<br><div align="center">
<br>
<br> <table width="539" border="1" cellspacing="0" cellpadding="0">
<br> <tr>
<br> <td width="78" height="38">问题类别:</td>
<br>

你前面有包含 打开数据库的文件吗?如果有的话,改成这样就可以了:

<%
dim k
k=cint(Request.QueryString("a"))
k=request("a")
if k="" or isnumeric(k)=false then
response.end
end if
set ODBCReader=Server.CreateObject("ADODB.Recordset")
rs2.Open "SELECT questionid,questionclass,questiontitle,questionfile FROM question where questionid='"&k&"' and questionif='否'" , conn,3,3
%>
<div align="center">

<table width="539" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="78" height="38">问题类别:</td>
<<td width="455"> <%=ODBCReader("questionclass")%> </td>
</tr>
<tr>

没 代码怎么 改