Jump to content

Lin100

New Members
  • Posts

    1
  • Joined

  • Last visited

Reputation

0 Neutral
  1. When I click on listBox1, I have 2 error messages ERROR: There is already an open DataReader associated with Command which must be closed first this.unitTableAdapter1.FillBy(this.dataSet_Property_Name_And_Unit_List.Unit); ERROR: System.ArgumentNullException: 'Value cannot be null. Parameter name: key' catch (System.Exception ex) /////////////////////////////////////// DataSet_Property_Name_And_Unit_List.xsd --> Right Click - -> Open --> UnitTableAdapter --> Right Click --> Configure SELECT Property_Name, Unit_Number FROM Unit /////////////////////////////////////// DataSet_Unit_Detail.xsd --> Right Click - -> Open --> UnitTableAdapter --> Right Click --> Configure SELECT Unit_Number, Property_Name, Rental_Cost, Security_Deposit, Bedroom, Bathroom, Square_Feet, Status FROM Unit WHERE (Property_Name = '@Property_Name') using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Retrieve_Data_From_Access_With_Navigation_Button { public partial class Form3 : Form { public Form3() { InitializeComponent(); } private void unitBindingNavigatorSaveItem_Click(object sender, EventArgs e) { this.Validate(); this.unitBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.dataSet_Unit_Detail); } private void Form3_Load(object sender, EventArgs e) { ERROR: System.ArgumentNullException: 'Value cannot be null. Parameter name: key' this.unitTableAdapter1.Fill(this.dataSet_Property_Name_And_Unit_List.Unit); this.unitTableAdapter.Fill(this.dataSet_Unit_Detail.Unit); } private void fillByToolStripButton_Click(object sender, EventArgs e) { try { this.unitTableAdapter1.FillBy(this.dataSet_Property_Name_And_Unit_List.Unit); } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { try { ERROR BELOW: There is already an open DataReader associated with Command which must be closed first this.unitTableAdapter1.FillBy(this.dataSet_Property_Name_And_Unit_List.Unit); } ERROR BELOW: System.ArgumentNullException: 'Value cannot be null. Parameter name: key' catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } } } } Last edited: Thursday at 5:43 PM Quote Reply Report Bookmark
×
×
  • Create New...