<%
if(request.form("textfield") <> "") then Command1__textfield = request.form("textfield")
if(request.form("textfield5") <> "") then Command1__textfield5 = request.form("textfield5")
if(request.form("textfield6") <> "") then Command1__textfield6 = request.form("textfield6")
if(request.form("textfield7") <> "") then Command1__textfield7 = request.form("textfield7")
if(request.form("textfield4") <> "") then Command1__textfield4 = request.form("textfield4")
if(request.form("textfield8") <> "") then Command1__textfield8 = request.form("textfield8")
if(request.form("textfield9") <> "") then Command1__textfield9 = request.form("textfield9")
if(request.form("textfield10") <> "") then Command1__textfield10 = request.form("textfield10")
if(request.form("textfield11") <> "") then Command1__textfield11 = request.form("textfield11")
if(request.form("textfield12") <> "") then Command1__textfield12 = request.form("textfield12")
if(request.form("textfield3") <> "") then Command1__textfield3 = request.form("textfield3")
if(request.form("textfield2") <> "") then Command1__textfield2 = request.form("textfield2")
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_iemm_STRING
Command1.CommandText = "INSERT INTO student (name, address, number, class, borndate, year, fromdate, math, english, chinese, lincenumber, sex) VALUES (" + Replace(Command1__textfield, "'", "''") + "," + Replace(Command1__textfield5, "'", "''") + "," + Replace(Command1__textfield6, "'", "''") + "," + Replace(Command1__textfield7, "'", "''") + "," + Replace(Command1__textfield4, "'", "''") + "," + Replace(Command1__textfield8, "'", "''") + "," + Replace(Command1__textfield9, "'", "''") + "," + Replace(Command1__textfield10, "'", "''") + "," + Replace(Command1__textfield11, "'", "''") + "," + Replace(Command1__textfield12, "'", "''") + "," + Replace(Command1__textfield3, "'", "''") + "," + Replace(Command1__textfield2, "'", "''") + " ) "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
运行说是我的insert语句错误,是Command1.Execute()处,大家帮我看看