下面代码直接放在文档中可以运行,请帮我检查一下那里不对
<%
set connect=server.createobject("ADODB.CONNECTION")
StrSQL="driver={sql server};server=*******;uid=*******;pwd=*******;database=*******"
connect.open strsql
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><form name="form1" method="post" action="">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"><select name=bigclass_name onchange="javascript:window.location='1.asp?bigclass_name='+this.value">
<option value="">-请选择-</option>
<%
dim rs1
bigclass_name=request("bigclass_name")
set rs1=server.createobject("adodb.recordset")
sql1="select * from netshop_bigclass"
rs1.open sql1,connect,1,1
for i=0 to rs1.recordcount
if not rs1.eof then
big_id=rs1("bigclass_id")
response.write"<option value="&rs1("bigclass_name")
if bigclass_name<>"" and rs1("bigclass_name")=bigclass_name then
response.write" selected"
end if
response.write">"&rs1("bigclass_name")&"</option>"
rs1.movenext
end if
next
%>
</select>
<select name=diqu >
<option value="">-请选择-</option>
<%
dim rs2,conn2,sql2
set rs2=server.createobject("adodb.recordset")
sql2="select * from netshop_smallclass where smallclass_bigclassid='"&big_id&"'"
rs2.open sql2,connect,1,1
if not (rs2.eof and rs2.bof) then
for i=0 to rs2.recordcount
if not rs2.eof then
response.write"<option value="&rs2("smallclass_name")&">"&rs2("smallclass_name")&"</option>"
rs2.movenext
end if
next
end if
%>
</select>
</td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>