User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 332,602 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,205 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 228 | Replies: 2
Reply
Join Date: Mar 2008
Posts: 1
Reputation: scottmichael is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
scottmichael scottmichael is offline Offline
Newbie Poster

Searching MY DB Records with .NET

  #1  
Mar 28th, 2008
I am new to .net and want to create a search field that querries my SQL database then display results sort of like google. Meaning query all fields for %Like% statements. I am using Visual Studio 2005.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 1,048
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 60
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Searching MY DB Records with .NET

  #2  
Mar 28th, 2008
search your records...

SELECT * FROM stories where title LIKE '%var%' OR story LIKE '%var%'

Simple. can get much more complex if you wish. but you need to be more specific on what you are after.
Last edited by peter_budo : Apr 5th, 2008 at 12:10 pm. Reason: Keep It Organized - please use [code] tags
I answer pm's.
I answer questions.
I answer quickly.
I answer.
Reply With Quote  
Join Date: Jun 2006
Posts: 12
Reputation: Hosam Kamel is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Hosam Kamel Hosam Kamel is offline Offline
Newbie Poster

Re: Searching MY DB Records with .NET

  #3  
Apr 4th, 2008
you can also use a SQL datasource and assign the select statment mentioned by SheSaidImaPregy to its select query.
Thanks,
Hosam Kamel
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 1:18 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC