Solved

String Search in .Net C#

Posted on 2014-04-11
3
244 Views
Last Modified: 2014-04-17
I am needing to ask experts if familiar with being able to add several words into a text box and do a search in .NET with SQL Server backend.  

Is there any info on.  ARe there examples?  How does it work?

in a
Text box:
enter example
 Name phone pet name  

Results would bring back Name phone and pet name and any other fields I need.
0
Comment
Question by:leezac
3 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39995094
I think we need more information on the structure of your database table(s).
0
 

Author Comment

by:leezac
ID: 39995142
I have not designed tables yet.  Just general question about if doable and how.  I have never done before and think would be complex if a lot of tables.  But suppose code would need to select from all the tables concerned if name is found in one and pet name in another.   I am just not sure how it would work.  Be like a Google search for SQL Server using .NEt.
0
 
LVL 11

Accepted Solution

by:
MajorBigDeal earned 500 total points
ID: 39995292
Yes this is doable but it might not be the best approach.  SQL Server supports full text searching (via CONTAINS and FREETEXT) which is what I think you are trying to do.  

That said, if  the users know which info represents the pet name versus the phone number then it might be better to provide individual search fields so that your queries could be more structured and efficient.   If they don't know then I can see where you might want to use full text search and just return any hits that you find in the database.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now