title: The only Result that display is the first table of my database
body: <p>The only result of any input in my code is always the first column of my table from my database. My database has two table in which I used INNER JOIN. I am a beginner.</p>
  <p>and the OUTPUT IS ALWAYS THE FIRST COLUMN OF MY TABLE FROM MY DATABASE.</p>
  <p>I'm using Windows application form C# and SQL Server database</p>
  <pre><code>using System
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Data.SqlClient;
  using System.Configuration
  
  
  
  
  namespace WindowsFormsApplication7
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
              textBox2.Enabled = false;
              textBox3.Enabled = false;
              textBox4.Enabled = false;
              textBox5.Enabled = false;
          }
          private void button1_Click(object sender, EventArgs e)  
          {
              SqlConnection con = new SqlConnection(&quot;Data Source=it-scholar\\sqlexpress;Initial Catalog=Dave;Integrated Security=True&quot;);
              con.Open();
       
              SqlCommand cmd = new SqlCommand (&quot;SELECT Table1.*, Table2.* FROM Table1 CROSS JOIN Table2 WHERE Table2.Idno = Table1.Id&quot;,con);
              cmd.Parameters.AddWithValue(&quot;Id&quot;, textBox1.Text);
              SqlDataReader reader1;
              reader1 = cmd.ExecuteReader();
              if (reader1.Read())
              {
                  textBox2.Text = reader1[&quot;name&quot;].ToString();
                  textBox3.Text = reader1[&quot;Timein&quot;].ToString();
                  textBox4.Text = reader1[&quot;Timeout&quot;].ToString();
                  textBox5.Text = reader1[&quot;date&quot;].ToString();
             
              }
              else
              {
                  MessageBox.Show(&quot;INVALID ID NUMBER PLEASE TRY AGAIN&quot;);
              }
              con.Close();
          }
  
          private void textBox1_TextChanged(object sender, EventArgs e)
          {
  
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
  
          }
  
          private void btncancel_Click(object sender, EventArgs e)
          {
              textBox1.Clear();
              textBox2.Clear();
              textBox3.Clear();
              textBox4.Clear();
              textBox5.Clear();
          }
      }
  }
  </code></pre>
  <p>Here's my database:</p>
  <p><img src="https://i.stack.imgur.com/dZ4Vw.png" alt="enter image description here" /></p>