我的一个注册表单提交后,显示注册成功,但数据没有插入表中,这是什么原因??
我这样试了
sql="INSERT INTO User (UserName,Password,PwdConfirm,Question,Answer,Sex,Email,HomePage,Comane,Add,Somane,Zip,Phone,Fox) VALUES ('"
sql=sql&"&UserName & "','" & Password & "','" & PwdConfirm & "','" & Question & "','" "
sql=sql&"&Answer & "','" & Sex &"','" & Email &"','" & HomePage &"','" & Comane & "','""
sql=sql&"&Add &"','" & Somane &"','" & Zip &"','" & Phone &"','" & Fox &"')""
rsReg.execute(sql)
还是不行的
rsReg.execute(sql)
执行SQL语句应该用
ADODB.Connection对象的excute方法吧?
Dim con
Set con=Server.CreateObject("ADODB.Connection")
con.Execute sql
不是很明白,意思是说把
sql="INSERT INTO User (UserName,Password,PwdConfirm,Question,Answer,Sex,Email,HomePage,Comane,Add,Somane,Zip,Phone,Fox) VALUES ('"
sql=sql & UserName & "','" & Password & "','" & PwdConfirm & "','" & Question & "','"
sql=sql& Answer & "','" & Sex &"','" & Email &"','" & HomePage &"','" & Comane & "','"
sql=sql & Add &"','" & Somane &"','" & Zip &"','" & Phone &"','" & Fox &"')"
放在Set Conn=Server.CreateObject("ADODB.Connection")这里面???