Next intRowElseIf txtSearchLName.Text And txtSearchCompany.Text Then if
If Conn.State = ConnectionState.Open Then Conn.Close() MsgBox( An error occured in UpdateDatabaseChanges: & Err.Number & - Err.Description) Exit SubEnd Sub23.Add the following UpdateDatabaseAddsprocedure to the form. This procedure is responsiblefor querying the local dataset for records that were added and then adding those new records Access database. Sub UpdateDatabaseAdds() On Error GoTo handleerror Create temporary DataSet. Dim tempDataSet As DataSet Get the changes for each modified row. tempDataSet = contactDS.GetChanges(DataRowState.Added) Open the connection to the Access databaseConn.Open() Update the Access database with the DataAdapter used to create the datasetcontactDA.Update(tempDataSet, Contacts ) close the connectionConn.Close() Exit Subhandleerror: If Conn.State = ConnectionState.Open Then Conn.Close() MsgBox( An error occurred in UpdateDatabaseAdds: & Err.Number & - Err.Description) Exit SubEnd Sub24.Add the following UpdateDatabaseDeletionsprocedure to the form. This procedure isresponsible for querying the local dataset to determine if any records were deleted and thendeleting those records permanently from the Access database. Sub UpdateDatabaseDeletions() On Error GoTo handleerror Create temporary DataSet. Dim tempDataSet As DataSet Get the changes for each modified row.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services