Hey Guys,
I am now loosing my cool over this problem.
let me paste my code an then i'll explain my problem.
Here's my code :
if (rn < ds1.Tables["Company"].Rows.Count-1)
{
rn = rn + 1;
textBox1.Text = ds1.Tables["Company"].Rows[rn].ItemArray[0].ToString();
SqlDataAdapter da1 = new SqlDataAdapter("Select C_ID from Company where C_NAME ='Germany'", con2);
da1.Fill(ds1, "Company");
Here, I have a textbox that should show the id of company that is selected by user from combo box. But somehow it keeps on nudging me error : Object reference not set to instance of an object. I tried all possible ways but couldn't find a way around.
Can anybody of you suggest anything?
thank you
Ajinkya