我想做循环插入内容,这样做对吗?
各位大虾,请教个问题,我想做个循环插入的代码,不知怎么老说错误,请帮我看看,谢谢!<%set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * FROM logodatas "
rs.open sql,conn,1,3%>
<%
Do Until rs.EOF %>
<%if request("fsdx<%=rs("name")%>")<>"" then
dim fsdx,fssj,fsnr,fszt,sffk,fsry
fsry=session("UserName")
fsdx=request.form("fsdx<%=rs("name")%>")
fsnr=request.Form("fsnr")
fssj=now()
fszt=request.form("jjzy")
sffk=request.form("xfhqr")
Set rs = Server.CreateObject("ADODB.Recordset")
SQL="insert into smsdata(fsdx,fssj,fsnr,fszt,sffk,fsry)values('"+fsdx+"',#"&fssj&"#,'"+fsnr+"','"+fszt+"','"+sffk+"','"+fsry+"')"
conn.execute SQL
%>
<%rs.MoveNext
Loop %>
<% conn.close
set conn=nothing%> 提示错误类型:
Microsoft VBScript 编译器错误 (0x800A03EE)
缺少 ')'
/ao/personalinterface/smsgroupsave.asp, line 8, column 23
if request("fsdx<%=rs("name")
----------------------^ 请各位大虾多多指教!