title: display count in textbox
body: <p>I have a simple problem. I have a table in dataset designer that have this query </p>
  
  <pre><code>SELECT COUNT(Sex) AS Male, COUNT(Sex) AS Female
  FROM tblPersonalInfo
  </code></pre>
  
  <p>can you please show me how to display the male and female count in 2 textboxes? and can you please check if my query is correct? i'm a newbie in visual studio c# 2010.</p>
  
  <p>form my previous projects, i use these to retrieve data from database and display in textbox.</p>
  
  <pre><code>public MAINDATABASEDataSet.tblPositionDataTable GetPositionData(string data)
          {
              MAINDATABASEDataSetTableAdapters.tblPositionTableAdapter ReturnPosition =  new MAINDATABASEDataSetTableAdapters.tblPositionTableAdapter();
              return ReturnPosition.GetDataByPosition(this.txtSearch.Text.Trim());
  
          }
  
  }
   private void btnCompleteSearch_Click(object sender, EventArgs e)
          {
  
                      MAINDATABASEDataSet.tblPositionDataTable GetPositionCommand1 = GetPositionData(this.txtSearch.Text);
                      MAINDATABASEDataSet.tblPositionRow GetPositionCommand2 = (MAINDATABASEDataSet.tblPositionRow)GetPositionCommand1.Rows[0];
                      this.txtMainPosition.Text = GetPositionCommand2.Position.ToString();
  
  
              }
  </code></pre>
  
  <p>and i use this query: </p>
  
  <pre><code>SELECT   Position  
  FROM     tblPosition
  WHERE    (ID = @IDMain)
  </code></pre>