I was wondering whether anyone had any idea why only one piece of data would throw this reference.
I am downloading a view from a SQL, so far all the entries have been working absolutely fine, but then I pick 1 item (out of 9,500) and get thrown this error.
I have checked the SQL and there is data there in this format:
X12345 - Forumxy-Abcdefg-AbcDefgAbcdef-Abcdefgh
There are no different characters, no foreign characters, no umlauts or anything of that nature. Just wondering if anyone can see why this data might throw an excepting in C# - are there too many chars, too many -
I just do not see why this particular piece of data, out of so many, would throw an exception and I am sure that there are longer strings in the data so a little bit lost at the moment.
The data is populating a ListBox which when doubleclicked populates a TextBox. The code is pretty simplistic and works on the other pieces of data, so I do not think it is a coding problem but it is below if you need it.
I am downloading a view from a SQL, so far all the entries have been working absolutely fine, but then I pick 1 item (out of 9,500) and get thrown this error.
I have checked the SQL and there is data there in this format:
X12345 - Forumxy-Abcdefg-AbcDefgAbcdef-Abcdefgh
There are no different characters, no foreign characters, no umlauts or anything of that nature. Just wondering if anyone can see why this data might throw an excepting in C# - are there too many chars, too many -
I just do not see why this particular piece of data, out of so many, would throw an exception and I am sure that there are longer strings in the data so a little bit lost at the moment.
The data is populating a ListBox which when doubleclicked populates a TextBox. The code is pretty simplistic and works on the other pieces of data, so I do not think it is a coding problem but it is below if you need it.
C#:
private void listBox2_DoubleClick(object sender, EventArgs e)
{
hbox.Text = listBox2.SelectedValue.ToString();
pbox.Text = listBox1.SelectedValue.ToString();
tl.Text = listBox3.SelectedValue.ToString();
}