Hello ,,
I used the following code to save what the user editing , the code don't give me any error code , but in the same time it don't do any thing , the data still without any new changes :
Dim a As String
a = comb3.Text & "/" & comb2.Text & "/" & comb1.Text
Dim SavInto As New OleDb.OleDbCommand
Dim ConStr As String = _
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & _
Application.StartupPath & "\base.mdb"
Dim Conn As New OleDbConnection(ConStr)
Conn.Open()
SavInto.Connection = Conn
SavInto.CommandType = CommandType.Text
SavInto.CommandText = "UPDATE tb SET Tasalsol = '" & _
Trim(frm.tx1.Text) & _
"' , anomber = '" & Trim(frm.TextBox2.Text) & _
"' , nam= '" & Trim(frm.tx3.Text) & _
"' , rotba= '" & Trim(frm.tx4.Text) & _
"' , spesh= '" & Trim(frm.tx5.Text) & _
"' , lastvstart= '" & a & _
"' WHERE Notes ='" & Trim(frm.tx8.Text) & "'"
SavInto.ExecuteNonQuery()
Conn.Close()
With frm
.tx1.Text = Me.tx1.Text
.TextBox2.Text = Me.tx2.Text
.tx3.Text = Me.tx3.Text
.tx4.Text = Me.tx4.Text
.tx5.Text = Me.tx5.Text
.tx6.Text = a
.tx8.Text = Me.tx8.Text
End With
frm.Show()
Me.Close()
I wrote the whole code , so what is the wrong exactly ?! and thank you
Note:There is some columns that may have many same data in its cells .