帮忙看看.菜鸟不知道为什么出错哦!谢谢了
<%ID=session("IDD")
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("shortmessage.mdb")
set conn = server.createobject("adodb.connection")
conn.Mode = 3
conn.open strconn
sql="select * from company where TypeCode ='"&ID&"'"
set rs=conn.execute(sql)
sql1 = "SELECT * FROM messagelist "
set rs1=conn.execute(sql1)
%>
<%do while not rs1.eof%>
<%
sql2="insert into messagecode(手机号码,发送单位,短信内容,发送时间) values('"&rs1("TEL")&"','"&rs("TypeName")&"','"&session("txtID")&"','"&now()&"')"
'这里报"发生意外"
if then
end if
%>
<%
rs.movenext
loop
%>
<%
conn.close
set rs1=nothing
set rs=nothing
%>
执行时报"sql2"那句发生意外,请帮帮忙,看看是是原因!
这循环是我自己写的,应该没问题吧?请高手指点一下!谢谢!