The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

No value given for one or more required parameters.

Last post 03-13-2008, 8:09 PM by Buda56. 2 replies.
Sort Posts: Previous Next
  •  03-12-2008, 10:12 PM 8398

    No value given for one or more required parameters.

    Hi,
        I am trying to add records to an MS Access database, when I hit the save key I get the above error.
     
    Works fine for viewing and editing existing records, the ID column of teh Access database is set to AutoNumber (Long Integer), I have specifically assigned either null vqlues or empty string values to fields where there is no value input by the end user but I still get the above error.
     
    Any ideas???
    <code>

    protected void btnSave_Click(object sender, EventArgs e)

    {

    ReviewFields rvF = new ReviewFields();

    int Flag = 0;

    if (txtPbm.Text == "")

    Flag = 1;

    if (ddlCComp.SelectedIndex == 0)

    Flag += 1;

    if (txtServer.Text == "")

    Flag += 1;

    if (ddlStatus.SelectedIndex == 0)

    Flag += 1;

    if (Flag == 0)

    {

    // Save/Update record

    if (hdRecID.Value != "")

    rvF.LoadByPrimaryKey(Convert.ToInt32(hdRecID.Value));

    else

    {

    rvF.AddNew();

    rvF.Problem = Convert.ToInt32(txtPbm.Text);

    }

    rvF.CAMSCompany = Convert.ToInt32(ddlCComp.SelectedItem.Value);

    rvF.ServerName = txtServer.Text;

    rvF.StartDate = rdpSDate.SelectedDate;

    rvF.Status = Convert.ToInt32(ddlStatus.SelectedItem.Value);

    rvF.Description = txtDescription.Text;

    rvF.Classification = ddlClass.SelectedItem.Text;

    rvF.Sdm = rdpSDM.SelectedDate;

    rvF.Client = rdpClient.SelectedDate;

    rvF.Review = rdpRDate.SelectedDate;

    rvF.Sla = rdpSLA.SelectedDate;

    rvF.Capacity = ddlCap.SelectedItem.Text;

    if (ddlMon.SelectedIndex > 0)

    rvF.MonLog = ddlMon.SelectedItem.Text;

    else

    rvF.MonLog = null;

    if (rtbICount.Text != "")

    rvF.Incident = Convert.ToInt32(rtbICount.Text);

    else

    rvF.Incident = 1;

    if (ddlAction.SelectedIndex > 0)

    rvF.Action = Convert.ToInt32(ddlAction.SelectedItem.Value);

    else

    rvF.Action = null;

    rvF.Owner = txtOwner.Text;

    rvF.Cause = txtCause.Text;

    rvF.Recommendations = txtRec.Text;

    rvF.Notes = txtNotes.Text;

    rvF.Save();

    RadAjaxPanel1.ResponseScripts.Add(string.Format("btnClose();"));

    }

    else

    {

    //Disply Error: Required Fields not complete

    RadAjaxPanel1.ResponseScripts.Add(string.Format("alert('All required fields have not been filled in!!');"));

    }

    }

    <end code>
     
     
    Regards..
    Peter
  •  03-13-2008, 6:04 AM 8400 in reply to 8398

    Re: No value given for one or more required parameters.

    Please use the "Code" button when posting code. It's the last toolbar button on the right when posting.

    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  03-13-2008, 8:09 PM 8405 in reply to 8398

    Re: No value given for one or more required parameters.

    Hi,
      Resolved my problem, there was a column name in the Access database that had a space in it's name. Once I removed the space and regenerated the EntitySpaces all works fine.
     
    Regards..
    Peter.
View as RSS news feed in XML