Hi, Below is the code snippet showing how we can insert, update and delete records using ADO.NET with DataGrid control. ------------------------------------------------------------------------- BEGIN CODE Private Const SELECT_STRING As String = _ "SELECT * FROM Contacts ORDER BY LastName, FirstName" Private Const CONNECT_STRING As String = _ "Data Source=Bender\NETSDK;Initial " & _ "Catalog=Contacts;User Id=sa" ' The DataSet that holds the data. Private m_DataSet As DataSet ' Load the data. Private Sub Form1_Load(ByVal sender As Object, ByVal e As _ System.EventArgs) Handles MyBase.Load Dim data_adapter As SqlDataAdapter ' Create the SqlDataAdapter. data_adapter = New SqlDataAdapter(SELECT_STRING, _ CONNECT_STRING) ' Map Table to Contacts. data_adapter.TableMappings.Add("Table", "Contacts") ' Fill the DataSet. m_DataSet = New DataSet() data_adapter.Fill(m_DataSet) ' Bind the DataGrid control to the Contacts DataTable. dgContacts.SetDataBinding(m_DataSet, "Contacts") End Sub Private Sub Form1_Closing(ByVal sender As Object, ByVal e _ As System.ComponentModel.CancelEventArgs) Handles _ MyBase.Closing If m_DataSet.HasChanges() Then Dim data_adapter As SqlDataAdapter Dim command_builder As SqlCommandBuilder ' Create the DataAdapter. data_adapter = New SqlDataAdapter(SELECT_STRING, _ CONNECT_STRING) ' Map Table to Contacts. data_adapter.TableMappings.Add("Table", "Contacts") ' Make the CommandBuilder generate the ' insert, update, and delete commands. command_builder = New SqlCommandBuilder(data_adapter) ' Uncomment this code to see the INSERT, ' UPDATE, and DELETE commands. 'Debug.WriteLine("*** INSERT ***") 'Debug.WriteLine(command_builder.GetInsertCommand.CommandText) 'Debug.WriteLine("*** UPDATE ***") 'Debug.WriteLine(command_builder.GetUpdateCommand.CommandText) 'Debug.WriteLine("*** DELETE ***") 'Debug.WriteLine(command_builder.GetDeleteCommand.CommandText) ' Save the changes. data_adapter.Update(m_DataSet) End If End Sub END CODE ------------------------------------------------------------------------- You may make some more enhancement in the code. For example, you may check the DataSet's HasChanges method to see if there are any changes been made before you go to create a new SqlD