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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:52:04+00:00 2026-05-26T00:52:04+00:00

I created a simple webservice in C# that returns a table with all the

  • 0

I created a simple webservice in C# that returns a table with all the values which is called from a SQL Stored Procedure. I need a little help I wanted to implement a search Textbox for my datagridview in my windowsform application. How could I pass the @search in the storedprocedure to my windows application and send the value back to the stored procedure? Also if I am approaching this the wrong way please let me know Thanks.

    SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ORCA"].ToString());

    SqlCommand cmd = new SqlCommand("usp_getcardinfo", connection);
    cmd.CommandType = System.Data.CommandType.StoredProcedure;

As of right now this populates the datagridview just fine. Would like to get it so you can search and that record displays in the datagridview.

Thanks

  • 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-26T00:52:05+00:00Added an answer on May 26, 2026 at 12:52 am

    Change your web method into parameter

    [WebMethod] 
    public List<clubmembers> GetClubMembers(String search)
    

    add statement before try catch

    SqlParameter paramSearch = new SqlParameter ("@search",SqlDbType.VarChar);
    paramSearch.Value = search;
    cmd.Parameters.Add(paramSearch);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my situation: I've successfully created a simple PHP webservice to pull data from
I am writing a simple rails app that caches values from a web service.
I've created a simple C# asp.net web service function which returns a string message
I'm looking to create a simple web service that when polled returns a unique
I'm trying to create a simple spring based webservice that supports a post with
I created a sample webservice which contain default 'HelloWorld' function as 'webmethod' when tried
I created a simple .Net web service which runs a very simple query (which
I've created an event handler that simply returns a list of objects that I
I have created an Ajax enabled WCF web service that contains this simple method:
I am trying to create an ajax request to a WebService that returns data

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.