title: IndexOutofRangeException :There is no row at position 0
body: <p>I am trying to design a mini project of a quiz application using resource bundle. I get an error of <code>There is no row at position 0</code> when I insert the following <code>if</code> condition. Where I am catching the string from combobox in variable <code>X</code>.</p>
  
  <pre><code>SampleResourceBundle.Loginpage l = new SampleResourceBundle.Loginpage();
  if(l.x.Equals("mr_IN"))
     sql = "select * from quesans where qid&gt;48";
  else if (l.x.Equals("en_US"))
     sql = "select * from quesans where qid&lt;48";
  </code></pre>
  
  <p>The error is given in the following statement in the method from the next form:</p>
  
  <pre><code>textBox1.Text = ds.Tables["QA"].Rows[recno].ItemArray[2].ToString();
  </code></pre>
  
  <p>But if I remove the <code>if</code> statement the code executes perfectly fine.</p>