求助:看看数据库联接那里错了?
<SCRIPT LANGUAGE="vbscript">function addfile()
dim str
str="<table WIDTH='750' BORDER='1' ALIGN='center' CELLPADDING='5' CELLSPACING='0' BORDERCOLOR='#111111' STYLE='BORDER-COLLAPSE: collapse' height='70'><TR> <td colspan='6'> <DIV ALIGN='center'><font color='#0000ff' size='4'>汽车发货</font></DIV></td></TR>"
if not IsNumeric (window.form1.filenum.value) then window.form1.filenum.value =1
for i=1 to window.form1.filenum.value
str=str&"<tr bgcolor=#eeeeee><td align=right><div align='center'>品 名</div></td><td colspan='2'><select name='hwname' size='1' ><option value='1'>1</option><option value='2'>2</option></select></td><td><div align='center'>件 数</div></td><td colspan='2'><input name='jsh' type='text' id='jsh'></td></tr>"
str=str&"<tr bgcolor=#eeeeee><td align=right><div align='center'>重量(吨)</div></td><td colspan='2'><input name='weight' type='text' id='weight'></td><td><div align='center'>批 号</div></td><td colspan='2'><input name='ph' type='text' id='ph'></td></tr>"
str=str&"<tr bgcolor=#eeeeee><td align=right><div align='center'>包 型</div></td><td colspan='2'><select name='bx' id='bx'><option value=''>请选择</option> <option value='大包'>大包</option><option value='小包'>小包</option></select></td><td><div align='center'>质量标识</div></td><td colspan='2'><input name='zhlbzh' type='text' id='zhlbzh'></td></tr>"
str=str&"<tr bgcolor=#eeeeee><td align=right><div align='center'>产 地</div></td><td colspan='2'><select name='chd' size='1' ><option value=''>请选择</option>"
<%set rs = server.CreateObject ("Adodb.recordset")
sql = "select * from [chandi] order by chdname"
rs.open sql,conn,1,1
do while not rs.EOF%>
str=str&"<option value="&<%=rs("chdname")%>&">"&<%=rs("chdname")%>&"</option>"
<%rs.movenext
loop
rs.close%>
str=str&"</select></td><td><div align='center'>加工单位</div></td><td colspan='2'><select name='jgdw' size='1'> <option value=''>请选择</option> <option value='123'>123</option></select></td></tr>"
str=str&"<tr bgcolor=#ffffff><td colspan='6' height='5'></td></tr>"
next
window.uptd.innerHTML =str&"</table>"
end function
</SCRIPT>