Solved

String Search in .Net C#

Posted on 2014-04-11
3
246 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 75

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

26 Experts available now in Live!

Get 1:1 Help Now