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

  • SEARCH
  • Home
  • 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 517641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:51:18+00:00 2026-05-13T07:51:18+00:00

today i fot one error. i am not able to understand why it is.

  • 0

today i fot one error. i am not able to understand why it is. i hope somebody will help me here

my method is

  public UserFamilyInfoBO GetUserFamilyInfo(Int64 UserId)
        {
            try
            {
                DataSet Ds = new DataSet();
                SqlCommand Cmd = new SqlCommand("GetUserFamilyInfo", Cn);
                SqlDataAdapter Da = new SqlDataAdapter();
                Da.SelectCommand = Cmd;
                Cmd.Parameters.Add("@UserId", SqlDbType.BigInt).Value = UserId;

                Cn.Open();
                Da.Fill(Ds);
                Cn.Close();
                return SetBO(Ds.Tables[0]);
            }
            catch (Exception)
            {
                return null;
            }
        }

when Da.Fill(Ds) is executed it throws error
“Procedure or function ‘GetUserFamilyInfo’ expects parameter ‘@UserId’, which was not supplied.”

i have already added parameter @UserId. and i am getting its value also when debugging. still i am getting the error.

  • 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-05-13T07:51:18+00:00Added an answer on May 13, 2026 at 7:51 am

    I don’t know whether it’s relevant, but you haven’t specified the type of the command. If this is a stored procedure, try using:

    Cmd.CommandType = CommandType.StoredProcedure;
    

    It’s possible that it’s ignoring the parameter on the grounds that it doesn’t appear anywhere in the text of the command – which doesn’t make sense for a SQL query, but does make sense for a stored procedure.

    If that doesn’t help, you might want to look in the logs on SQL Server to see what it’s actually being sent.

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

Sidebar

Related Questions

today my error is Called id for nil, which would mistakenly be 4 --
today I wanted to write a function which will deploy my blog page (developed
Today I've got this class: public class SmtpEmailProvider : IMessageProvider { private readonly SmtpClientWrapper
Today's problem in my code is kind of strange, and I could not reproduce
Today I got into a very interesting conversation with a coworker, of which one
Today I noticed that a few Google advertisements in an adsence block on one
Today, for no reason, my rails(2.1.0) application is very slow or even not responding.
Today I learned that swap is not allowed to throw an exception in C++.
Today in the morning I was testing my code suddenly I got this error.
Today I learned that one of the .NET libraries I use, OpenTK, requires me

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.