M
mistjin
Unregistered / Unconfirmed
GUEST, unregistred user!
set conn = server.createobject ("ADODB.Connection")
conn.open "MyDsn", "", ""
if not IsEmpty(Request.Form("tijiao")) then
addtext="'" &
Request.Form("num") &
"','" &
Request.Form("name") &
"','" _
&
Request.Form("sex") &
"','" &
Request.Form("age") &
"','" _
&
Request.Form("birthday") &
"','" &
Request.Form("education") _
&
"','" &
Request.Form("Zhiwu") &
"','" &
Request.Form("department") _
&
"','" &
Request.Form("phone") _
&
"','" &
Request.Form("mobilephone") &
"'"
into_db="INSERT INTO Employee(Number,Name,Sex,Age,Birthday,Education,zhiwu,Department,Phone,Mobilephone) VALUES(" _
&
addtext &
")"
** conn.Execute(into_db)
程序错误在**这行,但就是看不出错在哪里.请高手帮忙!!!
into_db调试出来的值是:
INSERT INTO Employee(Number,Name,Sex,Age,Birthday,Education,zhiwu,Department,Phone,Mobilephone)
VALUES('1121001','张三','男','21','1982-12-12','本科','经理','行政部门','87154165','13469736')
上面应该没什么错误吧?
但系统提示总说"INSERT INTO 语法错误"
conn.open "MyDsn", "", ""
if not IsEmpty(Request.Form("tijiao")) then
addtext="'" &
Request.Form("num") &
"','" &
Request.Form("name") &
"','" _
&
Request.Form("sex") &
"','" &
Request.Form("age") &
"','" _
&
Request.Form("birthday") &
"','" &
Request.Form("education") _
&
"','" &
Request.Form("Zhiwu") &
"','" &
Request.Form("department") _
&
"','" &
Request.Form("phone") _
&
"','" &
Request.Form("mobilephone") &
"'"
into_db="INSERT INTO Employee(Number,Name,Sex,Age,Birthday,Education,zhiwu,Department,Phone,Mobilephone) VALUES(" _
&
addtext &
")"
** conn.Execute(into_db)
程序错误在**这行,但就是看不出错在哪里.请高手帮忙!!!
into_db调试出来的值是:
INSERT INTO Employee(Number,Name,Sex,Age,Birthday,Education,zhiwu,Department,Phone,Mobilephone)
VALUES('1121001','张三','男','21','1982-12-12','本科','经理','行政部门','87154165','13469736')
上面应该没什么错误吧?
但系统提示总说"INSERT INTO 语法错误"