noona
noona

Reputation: 1

Retrieving records from Database in C#

I have a database connected to my program, I want to search this database records looking for a value entered by user previously in a text box. Any one have an idea how to search the whole database for that value.

Any help is appreciated! Thanks!

Upvotes: 0

Views: 373

Answers (2)

Nick Randell
Nick Randell

Reputation: 18315

Two simple steps.

  1. Get the value from the text box (depends on the language you are using)
  2. Execute a select query on the database using the value from the text box as a parameter in the where clause of the query.

However - you need to clarify the question a lot more in order to get a more sensible answer.

What languages are you using?

Upvotes: 1

Brian Scott
Brian Scott

Reputation: 9371

If you are looking to search the entire database tables for a specific piece of text then follow the guide here;

Sql Server text search across all tables

Upvotes: 1

Related Questions