Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8035879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:26:24+00:00 2026-06-05T02:26:24+00:00

hi i have tried to insert the data to data base, make use of

  • 0

hi i have tried to insert the data to data base, make use of class files.. I have two classes, from that one is Material.cs, and DataAccessLayer.cs. But executing my code i got error like Procedure or function sp_insert_componet has too many arguments specified.””

//From Material.cs

private string strCREATEDBY;
private string strCREATEDDATE;
private string strUPDATEDBY;
private string strUPDATEDDATE;
private string strSTATUS;

public string Createdby
{
    get
    {
        return strCREATEDBY;
    }
    set
    {
        strCREATEDBY = value;
    }
}
public string Createddate
{
    get
    {
        return strCREATEDDATE;
    }
    set
    {
        strCREATEDDATE = value;
    }
}
public string Updateddate
{
    get
    {
        return strUPDATEDDATE;
    }
    set
    {
        strUPDATEDDATE = value;
    }
}
public string Updatedby
{
    get
    {
        return strUPDATEDBY;
    }
    set
    {
        strUPDATEDBY = value;
    }
}
public string Status
{
    get
    {
        return strSTATUS;
    }
    set
    {
        strSTATUS = value;
    }
}

//Maingroup
//created by : ramya
//created date:15.2.2012
private string strIDENTIFY;
private string strNO;
private string strNAME;
private string strMAINIDENTIFICATION;


public string Identification
{
    get
    {
        return strIDENTIFY;
    }
    set
    {
        strIDENTIFY = value;
    }
}
public string NO
{
    get
    {
        return strNO;
    }
    set
    {
        strNO = value;
    }
}
public string NAME
{
    get
    {
        return strNAME;
    }
    set
    {
        strNAME = value;
    }
}
public string Mainidentify
{
    get
    {
        return strMAINIDENTIFICATION;
    }
    set
    {
        strMAINIDENTIFICATION = value;
    }
}
private string strItemtype;
public string Itemtype
{
    get
    {
        return strItemtype;
    }
    set
    {
        strItemtype = value;
    }
}
private string strSitename;
public string Sitename
{
    get
    {
        return strSitename;
    }
    set
    {
        strSitename = value;
    }
}

public int Savecomponent()
{
    objDL.Addparam("@Createdby", Createdby);
    objDL.Addparam("@Createddate", Createddate);
    objDL.Addparam("@Sitecode", NO);
    objDL.Addparam("@Itemtype", Itemtype);
    objDL.Addparam("@Status", Status);
    objDL.Addparam("@Maingroupsno", Mainidentify);
    objDL.Addparam("@Subgroupsno", Identification);
    objDL.Addparam("@Componetcode",NAME);
    objDL.Addparam("@Sitename", Sitename);
    int save = objDL.insert("sp_insert_componet");
    if (save > 0)
    {
        return 1;
    }
    else
    {
        return 0;
    }
}

//From DataAccessLayer.cs

public int insert(string strInsert)
{
    try
    {
        Con.Open();
        cmd.Connection = Con;
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = strInsert;
        int RetInsert = cmd.ExecuteNonQuery();
        return RetInsert;
    }
    catch (Exception ex)
    {
        throw ex;
    }
    //got error in this finally block

    finally
    {
        Con.Close();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:26:25+00:00Added an answer on June 5, 2026 at 2:26 am

    You are specifying arguments that the stored procedure isn’t expecting.
    Remove any arguments that aren’t defined by the stored procedure

    Make sure that every parameter in the block

    objDL.Addparam("@Createdby", Createdby);
    objDL.Addparam("@Createddate", Createddate);
    objDL.Addparam("@Sitecode", NO);
    objDL.Addparam("@Itemtype", Itemtype);
    objDL.Addparam("@Status", Status);
    objDL.Addparam("@Maingroupsno", Mainidentify);
    objDL.Addparam("@Subgroupsno", Identification);
    objDL.Addparam("@Componetcode",NAME);
    objDL.Addparam("@Sitename", Sitename);
    

    has a corresponding parameter in the stored procedure. Remove any parameter that isn’t defined in the procedure

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a test server that uses data from a test database. When I'm
I have a site that displays data on travel products from a MySQL database.
I have a FormView where I pull data from one table (MS Access), and
I have tried this url to insert uitextfield in custom cell but what i
I have a method which does a simple mysql insert, when I tried to
I am attempting to store objects derived from a templated base class in an
I have a number of tables that together make up a Test that somebody
I have a large amount of data to process in c++ and find that
Have tried to find solutions for this and can't really come up with anything.
I have tried to configure a new virtual host in apache. I have copied

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.