C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Comparing keywords from database and display records


Posted Date: 04 Jul 2009      Posted By: Abbas      Member Level: Gold     Points: 1   Responses: 5



Hi Friends,
i am working on web application with access as backend, my query is i have took the keywords from the user and stored in database seperated by comma(,) in a single column that means user can input more than 1 keywords which will be stored separated by (,). Now when user enters any text it should match that text with available keywords and if match founds it should display whole record.
I have stored the keywords in a string from database. and splitted it and stored it in array.Now i can check whether keywords are match but i dont know how could i check in keyword column and get selected row.
How could i achieve this.
If you have any solutions please reply soon.

Thanks in advance
Abbas Electricwala





Responses

Author: Madeshwaran    04 Jul 2009Member Level: BronzeRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

can you use LIKE functionality of the SQL? as select * from tbl where keyword like '%keyword%'


Author: Abbas    04 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Thanks Madeshwaran
You have solved my problem thanks a lot for your help.



Author: Devendra    05 Jul 2009Member Level: GoldRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

You can use like keyword

Select * from tbl where keyword like '%keyword%'

But Like Keyword is Depend on Situation

Suppose you have a key word 'Asp.Net'

And Person tries to 'sp' then it will also detect Asp.Net That is wrong

If you want to exact Match of keyword then this will give you wrong output

For Exact Match you have to use index of instead of Like

Thanks
dkmisra



Author: Madeshwaran    05 Jul 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

Devendra you are correct... i think i overlooked the problem...
thanks for the correction



Author: Abbas    06 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi Devendra,
Can you tell me what index of does and what is the syntax for index of query, how to use it.

Thanks & Regards
Abbas Electricwala



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Real time examples
Previous : Last 10 pages visited in asp dotnet
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use