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 7430087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:05:00+00:00 2026-05-29T09:05:00+00:00

what i want to do is while user click the link, the clicks will

  • 0

what i want to do is while user click the link, the clicks will increase by 1 but i failed to to do=(

output

Could not find stored procedure ‘updateMovieClicks’How to win in share?’,’64’

my stored procedure

ALTER PROCEDURE updateMovieClicks
(
@movieTitle varchar(50),
@movieClicks int
)
AS
update MovieListTable set movieClicks=@movieClicks where movieTitle=@movieTitle;

my programs code on page load

conn.Open();
SqlCommand cmdIncreaseMovieClicks = new SqlCommand("updateMovieClicks'" +
    Session["videoName"].ToString() + "','" + clicksIncrease + "'", conn);
SqlParameter movieTitle = new SqlParameter();
SqlParameter movieClicks = new SqlParameter();
cmdIncreaseMovieClicks.CommandType = CommandType.StoredProcedure;
cmdIncreaseMovieClicks.Parameters.Add("@movieClick", SqlDbType.Int).Value 
= clicksIncrease+1;
cmdIncreaseMovieClicks.ExecuteNonQuery();
conn.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-05-29T09:05:01+00:00Added an answer on May 29, 2026 at 9:05 am

    Your error is ocurring because the system thinks you are trying to find a stored procedure called 'updateMovieClicks'How to win in share?','64'. This is because you have concatenated your parameters in a string with your stored procedure name.


    When specifying that a command is of type StoredProcedure then you add your parameters seperately to the command text. Therefore only the stored procedure name goes in the command text, and the parameters are added as seperate objects to the SqlCommand.

    ALTER PROCEDURE updateMovieClicks
    (
    @movieTitle varchar(50)
    )
    AS
    update MovieListTable set movieClicks=(movieClicks+1) where movieTitle=@movieTitle;
    
    
    SqlCommand cmdIncreaseMovieClicks = new SqlCommand("updateMovieClicks", conn);
    cmdIncreaseMovieClicks.CommandType = CommandType.StoredProcedure;
    cmdIncreaseMovieClicks.Parameters.Add("@movieTitle", SqlDbType.nvarchar).Value 
    = session["videoName"].tostring();
    conn.Open();
    cmdIncreaseMovieClicks.ExecuteNonQuery();
    conn.Close();
    

    Here I’ve also improved your Stored Procedure query so that the movieClicks is calculated at SQL level.

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

Sidebar

Related Questions

When a user clicks on a link on my page, I want to be
Here's what I want to have happen: When the user clicks a link in
I want to exit the while loop when the user enters 'N' or 'n'.
I want to read user input from STDIN and process the preliminary input while
On LoginClick I want to run the user validation in the background while my
I want to leverage the Scala's Actor Framework while I develop the user interface
I use ASP.NET I want to show percentage to user from codebehind while database
I want the while loop to output based on matching column value of id.
I have a link that will allow users to click it and it fetches
i want to do when user go to this page the javascript form will

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.