Dear All Programmmer,
if I use the manual the database immediately updates but if I use the textbox the database does not update but only an update messagebox appears. Is there something wrong with the code or any other best recommendations?. I'm using visual studio 2015
Thanks
Dim pathDBF As String = Application.StartupPath()
Using cn = New System.Data.OleDb.OleDbConnection(String.Concat("Provider=VFPOLEDB;Data Source=" & pathDBF))
Dim tableDBF = "RSD, GSD, GPD, FFG, RPD"
cn.Open()
For Each tableName In tableDBF.Split(","c)
Using cmd = New OleDbCommand(String.Format("update {0} set Item=? where Item==?", tableDBF.Trim()), cn)
cmd.Parameters.Add("Item", OleDbType.VarChar).Value = TextBoxnewitem.Text
cmd.Parameters.Add("Item", OleDbType.VarChar).Value = TextBoxolditem.Text
cmd.ExecuteNonQuery()
End Using
MessageBox.Show("updated", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
Next
cn.Close()
End Using