我也不知错在哪里,请各位指点.代码如下:
<%
dim sMsg
sMsg=1
rows = clng("0" & request("MaxRows"))
if rows > 0 then
on error resume next
dim sql,i
Set conn =Server.CreateObject("ADODB.Connection")
conn.Open application("ConnStr")
if rows <= 1 then
sql = "INSERT INTO [Article] ([ArticleName],[Class]) VALUES (" & _
request("articlename") & "','" & _
request("class") & "')"
conn.execute sql
else
for i=1 to rows
sql = "INSERT INTO [Article] ([ArticleName],[Class]) VALUES (" & _
request.form("articlename")(i) & "','" & _
request.form("class")(i) & "')"
conn.execute sql
next
end if
conn.close
set conn=nothing
sMsg = err.number
end if
%>
[此贴子已经被作者于2007-11-5 11:56:13编辑过]