Let me explain what i am trying to do.
I am creating a number of webforms that allow a building manager to receive forms from managers requesting for equipment, offices, etc for new employees or existing employees. In one webform the building manager can click a GetForm button that will get the information from a MS Access Database and show the form with all the data filled out based on what was saved by a manager. If the building manager wants to change something he clicks a button to enable all the controls and can change any textbox or checkbox on the page. After that he/she clicks an Update button that calls a function that grabs the params and updates the database. However when update is clicked nothing is updated but no errors are thrown. In MS Access I tested the query and it works. What could i be missing?
Source Page(edited out some params to make more readable):
Code:
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/aDatabase.mdb"
SelectCommand="SELECT * FROM [Requests]"
UpdateCommand="UPDATE [Requests] SET [Requester Name] = ?, //...some 60 params later [Special Instructions] = ? WHERE [ID] = ?">
<UpdateParameters>
<asp:FormParameter Name="Requester Name" />
//...some 60 params later
<asp:FormParameter Name="Special Instructions" />
<asp:Parameter Name="ID" />
</UpdateParameters>
</asp:AccessDataSource>
Code Behind Update Button Click:
Code:
protected void btn_update_Click(object sender, EventArgs e)
{
GridView1.Enabled = false;
string eN = Request.QueryString["form"];
string dE = decryptQueryString(eN);
AccessDataSource1.UpdateParameters["Requester Name"].DefaultValue = txb_rqstname.Text;
AccessDataSource1.UpdateParameters["Special Instructions"].DefaultValue = txbx_SpecialInstructions.Text;
AccessDataSource1.UpdateParameters["ID"].DefaultValue = dE;
for (int x = 0; x < 60; x++)
{
//debug Response.Write(AccessDataSource1.UpdateParameters[x].DefaultValue + " ");
}
AccessDataSource1.Update();
//Response.Redirect("UpdateSuccessful.aspx");
}