求教insert语句不能执行的问题
Sub AddRecord(sender As Object, e As EventArgs)Dim objConn As New OleDbConnection()
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("ssyyrr1.mdb")
objConn.Open()
Dim strSQL As String
strSQL = "Insert Into 访客留言簿(留言者, 电子邮件, IP, 留言内容, 留言日期) Values ('" & UserName.Text & "', '" & Email.Text & "', '" & Request.UserHostAddress & "', '" & Content.Text & "', '" & System.DateTime.Now & "')"
Dim objCmd As New OleDbCommand(strSQL, objConn)
objCmd.ExecuteNonQuery()
objConn.Close()
Response.Redirect("Prac10-01-1.aspx")
End Sub