数据库添加记录的代码错误
我是一个初学者(学过vb6.0),除了你们没有人可以帮我,看一下下面代码算不算是存储过程?是一个数据库添加记录的代码,提示“标准表达式中数据类型不匹配”这是为什么?程序代码:
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click wbkqingkong() '清空文本框 Dim intposition As Integer Dim objcommand As OleDbCommand = New OleDbCommand() objconnection.Open() intposition = objcurrencymanager.Position objcommand.Connection = objconnection = "insert into biao" & _ "(D该用地,X用地规模,J道路红线,批准项目机构,日期,建设单位,序号)" & _ "values (@D该用地,@X用地规模,@J道路红线,@批准项目机构,@日期,@建设单位,@序号)" objcommand.Parameters.AddWithValue("@D该用地", TextBox57.Text) objcommand.Parameters.AddWithValue("@X用地规模", TextBox56.Text) objcommand.Parameters.AddWithValue("@J道路红线", TextBox55.Text) objcommand.Parameters.AddWithValue("@批准项目机构", TextBox54.Text) objcommand.Parameters.AddWithValue("@日期", TextBox53.Text) objcommand.Parameters.AddWithValue("@序号", TextBox47.Text) objcommand.Parameters.AddWithValue("@建设单位", 建设单位TextBox1.Text) Try objcommand.ExecuteNonQuery() Catch oledbexceptionerr As OleDbException MessageBox.Show(oledbexceptionerr.Message) End Try objconnection.Close() filldatasetandview() binddfields() '文本框断开绑定,重新绑定 mydtgr() '绑定DataGridView objcurrencymanager.Position = intposition showposition() End Sub