title: Only a single char inserted on stored procedure Insertion
body: <p>I am using <em>VS 2008</em> <code>Asp.net C#</code>. To <em>insert</em> the data I have created a <code>stored procedure</code>:</p>
  
  <pre><code>ALTER PROCEDURE INS_tblRegister
      @Enroll varchar,
      @Name varchar,
      @Dob varchar,
      @Gender varchar,
      @Mobile varchar,
      @Address varchar,
      @Branch varchar, 
      @Sem varchar,
      @Year varchar, 
      @Password varchar
  AS
      INSERT INTO tblRegister (Enrollment, Name, Dob, Gender, Mobile, Address, Branch, Sem, Year, Password)       
      VALUES (@Enroll,@Name,@Dob,@Gender,@Mobile,@Address,@Branch,@Sem,@Year,@Password)
  
      RETURN
  </code></pre>
  
  <p>Below is my code for <code>button_Click</code> :</p>
  
  <pre><code>try
  {
      con.Open();
      cmd = new SqlCommand("INS_tblRegister",con);
      cmd.CommandType = CommandType.StoredProcedure;
      cmd.Parameters.Add("@Enroll", SqlDbType.VarChar).Value = txtEnroll.Text;
      cmd.Parameters.Add("Name", SqlDbType.VarChar).Value = txtName.Text;
      cmd.Parameters.Add("Dob", SqlDbType.VarChar).Value = (txtDob.Text);
  
      cmd.Parameters.Add("Gender", SqlDbType.VarChar).Value = ddlGender.Text;
      cmd.Parameters.Add("Mobile", SqlDbType.VarChar).Value = txtMobile.Text;
      cmd.Parameters.Add("Address", SqlDbType.VarChar).Value = txtAddress.Text;
      cmd.Parameters.Add("Branch", SqlDbType.VarChar).Value = txtBranch.Text;
      cmd.Parameters.Add("Sem", SqlDbType.VarChar).Value = txtSem.Text;
      cmd.Parameters.Add("Year", SqlDbType.VarChar).Value = txtYear.Text;
      cmd.Parameters.Add("Password", SqlDbType.VarChar).Value = txtPassword.Text;
      cmd.ExecuteNonQuery();
      con.Close();
  
      lblMsg.Text="Saved";
  }
  catch(Exception ex)
  {
      lblMsg.Visible = true;
      lblMsg.Text = ex.Message;
  }
  </code></pre>
  
  <p>This code was <em>executed</em> successfully but when I see the database I found : </p>
  
  <p><img src="https://i.stack.imgur.com/hgkjw.png" alt="Database ScreenShot"></p>
  
  <p>Only the first character of my entry saved eg: look at the Gender field,I wrote Male but only M is inserted to database. Please Help me...</p>