Click here to Skip to main content
15,913,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Me.SMSDATA1DBTableAdapter.Fill(Me.SMSToolDBDataSet.SMSDATA1DB)
By using Data Grid i display the data.
Now i need to Update the Access table respective of their fields.
Any Body PLEASE help me.........
Posted

 
Share this answer
 
Use the Update Command :
VB
Dim cmdUpdate As New OleDbCommand
cmdUpdate.Connection = cnnOLEDB  'Setting connection property of command object
cmdUpdate.CommandText = "UPDATE TableName SET FieldName = '" & txtName.Text & "' WHERE IDFieldName = " & txtID.Text & ";" 
Try
   cmdUpdate.ExecuteNonQuery() 'Executing Update Command
Catch ex as Exception
   MessageBox.Show(ex.Message) 'Error MEssage
End Try
 
Share this answer
 
Comments
Member 13835606 11-Jun-18 22:57pm    
cnnOleDB =?
Manoj K Bhoir 26-Mar-19 3:51am    
DB Connection String

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900