Dim c As String = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=c:\database.mdb;Jet OLEDBatabase Password=1;"
Dim con2 As New OleDb.OleDbConnection(c)
Dim st2 As String = "UPDATE table set column1='" & CInt(TextBox1.Text) & "', column2= '" & CInt(TextBox2.Text) & "' , column3='" & CInt(TextBox3.Text) & "', column4='" & CInt(TextBox4.Text) & "' , column5='" & CDate(TextBox5.Text) & "' , column6='" & CStr(TextBox6.Text) & "' "
com2 = New OleDb.OleDbCommand(st2, con2)
con2.Open()
com2.ExecuteNonQuery()
con2.Close()
refresh()
index of column1 is in listbox,and i wont update database with data.if i click on one index in listbox, in textboxes displayes data.if i change one data and click on button for update my data is update but data which is changes
is the same in the full column.
Dim con2 As New OleDb.OleDbConnection(c)
Dim st2 As String = "UPDATE table set column1='" & CInt(TextBox1.Text) & "', column2= '" & CInt(TextBox2.Text) & "' , column3='" & CInt(TextBox3.Text) & "', column4='" & CInt(TextBox4.Text) & "' , column5='" & CDate(TextBox5.Text) & "' , column6='" & CStr(TextBox6.Text) & "' "
com2 = New OleDb.OleDbCommand(st2, con2)
con2.Open()
com2.ExecuteNonQuery()
con2.Close()
refresh()
index of column1 is in listbox,and i wont update database with data.if i click on one index in listbox, in textboxes displayes data.if i change one data and click on button for update my data is update but data which is changes
is the same in the full column.