当我尝试将数据从VB.net
插入MS Access
数据库表时出现问题。我的代码是:
Try
Dim d As New DBConnect
Dim indx As Integer
indx = DataGridView1.Rows.Count - 1
d.Editdata(String.Format("INSERT INTO Client (ClientName, ClientAddress, ClientPhone, ClientCredit, ClientLastPay) values('{0}','{1}','{2}','{3}','{4}')", FlatTextBox1.Text, FlatTextBox2.Text, FlatTextBox3.Text, FlatTextBox4.Text, FlatTextBox5.Text))
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
通过调试错误在这一行:
d.Editdata(String.Format("INSERT INTO Client (ClientName, ClientAddress, ClientPhone, ClientCredit, ClientLastPay) values('{0}','{1}','{2}','{3}','{4}')", FlatTextBox1.Text, FlatTextBox2.Text, FlatTextBox3.Text, FlatTextBox4.Text, FlatTextBox5.Text))
错误图片: https://s31.postimg.org/ew7cxpfy3/Sans_titre.png 。
希望得到你的帮助?