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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:12:09+00:00 2026-05-23T11:12:09+00:00

I new to C#, and trying to make a winform app, i am having

  • 0

I new to C#, and trying to make a winform app, i am having problem to search a Database depending upon the text entered in a textbox.

I have added the gridview, when adding a new query, what should be the WHERE clause like to be able to use data from Winform controls?

Also do i need to change the fill table call ?

And is there any Good books that may cover a good amount of similar topic,i.e,working with databases in c# winforms?

Thank you all, in advance..

  • 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-23T11:12:10+00:00Added an answer on May 23, 2026 at 11:12 am

    You should look into making a stored procedure for your query and then you supply the value from your textbox.Text field into your stored procedure.

    This other question might help you with the C# syntax:
    How to execute a stored procedure within C# program

    And assuming you’re trying out SQL Server Express, this should help you setup the query as a stored procedure:
    http://msdn.microsoft.com/en-us/library/ms345415.aspx

    Otherwise if you’re going for basic SQL in the winForm, you likely want to run the query based on the user pressing a button rather than the “TextChanged” event on the TextBox:

    String queryStr = "SELECT * "+
        "FROM my_table "+
        String.Format("WHERE my_value = '{0}'", TextBox1.Text);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a copy of a database to a new database
I'm new in android and i'm trying to make an android app to display
I am new to Java and have been trying to make some simple games
I am fairly new to iOS development and trying make a simple app which
I'm trying to make an android app (I'm new in the Android programming world),
I'm trying to make a new CLLocation subclass. This is the skeleton: #import <UIKit/UIKit.h>
I'm trying to make a new wx.Choice-like control (actually a replacement for wx.Choice) which
I am trying to make a blackjack game where before each new round, the
When trying new software and compiling with the classic ./configure , make , make
I am trying to make a firefox extension which looks at all the new

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.