EventDBDataSet eventDBDataSet = new EventDBDataSet(); EventDBDataSet.ContactsRow contactsRow = eventDBDataSet.Contacts.NewContactsRow(); contactsRow.contactName = contact.contactName; contactsRow.contactNumber = contact.contactNumber; eventDBDataSet.Contacts.Rows.Add(contactsRow); EventDBDataSetTableAdapters.ContactsTableAdapter contactsTableAdapter = new EventDBDataSetTableAdapters.ContactsTableAdapter(); contactsTableAdapter.Update(eventDBDataSet.Contacts); eventDBDataSet.Contacts.AcceptChanges();
DataRow[] dataRows = eventDBDataSet.Contacts.Select(); foreach (DataRow dr in dataRows) { contactName = dr["contactName"].ToString(); MessageBox.Show(contactName); }