[求助] insert into 语句的语法错误.....
用户注册资料填完,左上方就出现
到底哪个地方有问题啦~~
If Page.IsValid Then
Try
Dim con As New OleDbConnection
con.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("../fdkasasdka/database/yonghuzhuce.mdb")
Dim cmd As New OleDbCommand
cmd.CommandText = "insert into person(id,password,name,sex,birthdate,zjhm,email,address) values (@id,@password,@name,@sex,@birthdate,@zjhm,@email,@address)"
cmd.Parameters.Add(New OleDbParameter("@id", OleDbType.VarChar))
cmd.Parameters("@id").Value = TextBox1.Text
cmd.Parameters.Add(New OleDbParameter("@password", OleDbType.VarChar))
cmd.Parameters("@password").Value = TextBox2.Text
cmd.Parameters.Add(New OleDbParameter("@name", OleDbType.VarChar))
cmd.Parameters("@name").Value = TextBox4.Text
cmd.Parameters.Add(New OleDbParameter("@sex", OleDbType.VarChar))
cmd.Parameters("@sex").Value = RadioButton1.Text
cmd.Parameters("@sex").Value = RadioButton2.Text
cmd.Parameters.Add(New OleDbParameter("@birthday", OleDbType.Date))
cmd.Parameters("@birthday").Value = TextBox5.Text
cmd.Parameters.Add(New OleDbParameter("@zjhm", OleDbType.VarChar))
cmd.Parameters("@zjhm").Value = TextBox6.Text
cmd.Parameters.Add(New OleDbParameter("@email", OleDbType.VarChar))
cmd.Parameters("@email").Value = TextBox7.Text
cmd.Parameters.Add(New OleDbParameter("@address", OleDbType.VarChar))
cmd.Parameters("@address").Value = TextBox8.Text
cmd.Connection = con
con.Open()
cmd.ExecuteNonQuery()
con.Close()
Catch ex As Exception
Response.Write(ex.Message)
End Try
End If