title: ORA-01008: not all variables bound - ASP.net Web application
body: <p>I get this "ORA-01008: not all variables bound" error in the insert query when i try to insert data into oracle database using GridView footer template to insert the data into the oracle database, i tested the query on the server and it works just fine but when i try to run the app and excute the query using the add button it shows the error</p>
  
  <p>**Grid View Code am using template fields so i can edit the grid view the footer template **</p>
  
  <pre><code>&lt;asp:GridView ID="gvmb"  runat="server" AutoGenerateColumns="False"  BackColor="#DEBA84"  BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" Width="60%" style="margin-left: 350px" Height="226px" ShowFooter="True" OnRowCommand="gvmb_RowCommand" DataKeyNames="member_id" ShowHeaderWhenEmpty="True"&gt;
                  &lt;FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" /&gt;
                  &lt;HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" /&gt;
                  &lt;PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" /&gt;
                  &lt;RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" /&gt;
                  &lt;SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" /&gt;
                  &lt;SortedAscendingCellStyle BackColor="#FFF1D4" /&gt;
                  &lt;SortedAscendingHeaderStyle BackColor="#B95C30" /&gt;
                  &lt;SortedDescendingCellStyle BackColor="#F1E5CE" /&gt;
                  &lt;SortedDescendingHeaderStyle BackColor="#93451F" /&gt;
                  &lt;Columns&gt;
                      &lt;asp:TemplateField HeaderText="id"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label text='&lt;%# Eval("member_id") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:TextBox ID="member" text='&lt;%# Eval("member_id") %&gt;' runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/EditItemTemplate&gt;
                          &lt;FooterTemplate&gt;
                                       &lt;asp:TextBox ID="member_idfooter"  runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
                      &lt;asp:TemplateField HeaderText="Name"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label text='&lt;%# Eval("user_name") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:TextBox ID="uname" text='&lt;%# Eval("user_name") %&gt;' runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/EditItemTemplate&gt;
                           &lt;FooterTemplate&gt;
                                       &lt;asp:TextBox ID="user_namefooter" runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
                      &lt;asp:TemplateField HeaderText="address"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label text='&lt;%# Eval("address") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:TextBox ID="addres" text='&lt;%# Eval("address") %&gt;' runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/EditItemTemplate&gt;
                           &lt;FooterTemplate&gt;
                                       &lt;asp:TextBox ID="addressfooter" runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
  
                      &lt;asp:TemplateField HeaderText="Email"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label text='&lt;%# Eval("email_address") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:TextBox ID="email" text='&lt;%# Eval("email_address") %&gt;' runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/EditItemTemplate&gt;
                           &lt;FooterTemplate&gt;
                                       &lt;asp:TextBox ID="email_addressfooter" runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
  
                      &lt;asp:TemplateField HeaderText="password"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label text='&lt;%# Eval("password") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:TextBox ID="pass" text='&lt;%# Eval("password") %&gt;' runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/EditItemTemplate&gt;
                           &lt;FooterTemplate&gt;
                                       &lt;asp:TextBox ID="passwordfooter" runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
                      &lt;asp:TemplateField HeaderText="mobile number"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label text='&lt;%# Eval("mob_number") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:TextBox ID="mob" text='&lt;%# Eval("mob_number") %&gt;' runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/EditItemTemplate&gt;
                           &lt;FooterTemplate&gt;
                                       &lt;asp:TextBox ID="mob_numberfooter" runat="server"&gt;
  
                              &lt;/asp:TextBox&gt;
                          &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
  
                      &lt;asp:TemplateField&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:LinkButton ID="edit" runat="server" CommandName="edit" ToolTip="Edit"&gt;Edit&lt;/asp:LinkButton&gt;
                                &lt;asp:LinkButton ID="delete" runat="server" CommandName="delete" ToolTip="Delete"&gt;Delete&lt;/asp:LinkButton&gt;
  
                          &lt;/ItemTemplate&gt; 
  
                          &lt;FooterTemplate&gt;
                               &lt;asp:LinkButton ID="add" runat="server" CommandName="add" ToolTip="add"&gt;add&lt;/asp:LinkButton&gt;
  
                          &lt;/FooterTemplate&gt;
                      &lt;/asp:TemplateField&gt;
  
                  &lt;/Columns&gt;
              &lt;/asp:GridView&gt;
              &lt;br /&gt;
              &lt;asp:Label Text="" ID="lblsuccess" runat="server" ForeColor="Green"&gt;&lt;/asp:Label&gt;
              &lt;br /&gt;
              &lt;asp:Label Text="" ID="lblerror" runat="server" ForeColor="red"&gt;&lt;/asp:Label&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><strong>C# code including the insert event i get the error in the add.ExcuteNonQuery() method</strong></p>
  
  <pre><code> if (e.CommandName.Equals("add"))
              {
                  coon.Open();
                  string query = "INSERT INTO members (member_id, user_name,address ,mob_number,email_address,password ) VALUES (:member_id, :user_name,:address ,:mob_number,:email_address,:password)";
                  OleDbCommand add = new OleDbCommand(query, coon);
                  add.Parameters.AddWithValue(":member_id", (gvmb.FooterRow.FindControl("member_idfooter") as TextBox).Text.Trim());
                  add.Parameters.AddWithValue(":user_name", (gvmb.FooterRow.FindControl("user_namefooter") as TextBox).Text.Trim());
                  add.Parameters.AddWithValue(":address", (gvmb.FooterRow.FindControl("addressfooter") as TextBox).Text.Trim());
                  add.Parameters.AddWithValue(":mob_number", (gvmb.FooterRow.FindControl("mob_numberfooter") as TextBox).Text.Trim());
                  add.Parameters.AddWithValue(":email_address", (gvmb.FooterRow.FindControl("email_addressfooter") as TextBox).Text.Trim());
                  add.Parameters.AddWithValue(":password", (gvmb.FooterRow.FindControl("passwordfooter") as TextBox).Text.Trim());
  
                  add.ExecuteNonQuery();
                  fillmembers();
                  lblsuccess.Text = "New Recored Added";
                  lblerror.Text = "";
                  coon.Close();
              }
  </code></pre>