473,591 Members | 2,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp .net / sql database / search function

Hi all,

I've searched around on this topic but haven't come up with anything
that matches exactly what I am trying to do. I have an ASP .net
application running over a SQL database. I need to allow users to do a
"free text" search on some of the SQL data. I'm thinking there must be
code out there to do this already. I don't want to reinvent the wheel,
and it doesn't help that I wouldn't know where to start reinventing
anyway... :)

Nov 19 '05 #1
2 1616
Well, after more searching I have discoverd how to turn on the full
text indexing and use the sql CONTAINS and FREETEXT. I have run up on
another issue maybe someone can help with. This one is kind of hard to
explain, but here it goes.

The freetext search on my site should search various fields in
different tables. All tables are associated to the main table by
foreign key. When the search is complete a datagrid should show with
some preliminary info from the main table and a option to view a single
record or to export the datagrid to excel.

TABLE: incident PRIMARY KEY: incident_number
TABLE: person FOREIGN KEY: incident_number
TABLE: property FOREIGN KEY: incident_number
TABLE: attachment FOREIGN KEY: incident_number

My problem is that FREETEXT can only be performed on one table at a
time. So if I perform each query separately pulling the incident_number
from each query, how can I combine all of these incident numbers
(without duplicates) into my final datagrid?

Thanks all. I hope my description made some sense.

Nov 19 '05 #2
Well, looks like I may have solved my problem by using several SELECT
statements joined by a UNION. Anyone agree or disagree? Thanks.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1840
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags around their words, the app then replaces these with the html equivalent and saves it to the database... Thus far this has been working very well.
3
1918
by: TrvlOrm | last post by:
I am having great difficulty in these asp scripts, using VBscript and JavaScript. I have 4 files that all need to be linked together. The first file "Books.html" - needs to search for a Book title, author or ISBN number from a Access database called "Books.mdb". When the user clicks Submit from the "Books.html" file (after inputting info in a text box and clicking the required box to define Title, Author or ISBN), the information is...
1
4311
by: Bj?rn Keil | last post by:
Hi, first of all I have to say I'am new to MS Access, I'm used to database systems like Oracle or MySQL. I created a simple database consisting of a single table and a form to fill in new entrys and search for existing entrys. But the search function that Access generates as I created the proper button is way to simple, I need a function that enables to search in several columns. I saw a few quite simple examples where this was done by...
2
1633
by: Guoqi Zheng | last post by:
Dear sir, I have over 2000 products with detail information on database. I would like to offer our visitors an advanced search function to search our database. Currently, I am using the like % keyword in Ms Sql to offer the search function. However, I found that function not enough when people like to search a sentence or when dealing with search result ranking. Can some one point out a good article/source code for database searching...
3
1528
by: Chris H | last post by:
Ok in the following code I am trying to have my keywards meta tag auto insert the top 10 titles from most recently added database entries, right now the while loop is only setting the $keyword varibale with one title and not the top 10.. not sure what i am doing wrong... Note: keyword retrival code will be between ######## //comment CODE #######
3
2930
by: josh.kuo | last post by:
Sorry about the subject, I can't think of a better one. I recently wrote some PHP classes that I think might be of interest to this group. Since I have been reaping the benefits of reading news groups for years, I figure it's time for me to contribute a little bit back, maybe some people out there will find this useful. * Introduction This is a "how-to" style article, showing by example how to dynamically
3
1810
by: John Phelan-Cummings | last post by:
I have a front-end application called, “inbusiness.mdb” and three back-ends databases called, “inbusinessClient_be.mdb”, “inbusinessFund_be.mdb”, and, “inbusiness_be”. I created three back-ends for the potential intensive use of certain areas of the front-end application to their back-end tables by certain type of organizations. With the code below, (used to make future front-end updates
7
11775
by: ianenis.tiryaki | last post by:
well i got this assignment which i dont even have a clue what i am supposed to do. it is about reading me data from the file and load them into a parallel array here is the question: Step (1) Your first task is to write a program which reads this file into two parallel arrays in memory. One array contains the titles, and the other array contains the authors. The arrays are 'parallel' in the sense that the n-th element of the authors...
1
7523
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and having the sql statement dynamically built according to the input provided by the user. I have used the method described here hundreds of times it is quick and adaptive. I generally use a frames page for the search, in this way the search is maintained...
0
7934
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7870
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
7992
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8225
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5732
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3891
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1465
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.