Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 27th, 2004, 04:45 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Search Does not go beyond 1st word in field

Hi All,

I have 2 fields in SQL 2000 Database, called "Fields_of_interest" and "Name." Users input their data into them. What I want to do is be able to search on the "fields_of_interest" field. So for example, I have two records inputed.

Name: Fields_of_interest:
Leon security, IT, programmer
John security, accounting,

Here is the problem. In an ASP "search" page that I have created, when I do a search, I can ONLY search on the first word of the "Fields_of_interest" field. In other words, let say I want to search for someone who is interested in Accounting. I will get a NO record result, because the query is not looking for anything beyond the first word in the field. Any idea why it is doing this? Below is my query.

mySQL="SELECT ApplicantID, firstname, lastname, email, start_date, end_date, fields_of_interest, academic_level, academic_goals, career_goals FROM internship_form where isArchive=1"

mySQL=mySQL & " AND fields_of_interest like '" & fields_of_interest & "%'"
Reply With Quote
  #2 (permalink)  
Old December 27th, 2004, 06:10 PM
Friend of Wrox
 
Join Date: Jan 2004
Location: , , USA.
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this:

mySQL="SELECT ApplicantID, firstname, lastname, email, start_date, end_date, fields_of_interest, academic_level, academic_goals, career_goals FROM internship_form where isArchive=1"

mySQL=mySQL & " AND fields_of_interest like '%" & fields_of_interest & "%'"
Reply With Quote
  #3 (permalink)  
Old December 27th, 2004, 08:11 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Shahchi1, this work! thanks!

Leon

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search certain word using XML deean XML 16 June 12th, 2008 05:57 AM
Word search - Count Hits bonekrusher XSLT 5 January 2nd, 2008 10:26 AM
Populate field names upon selection from 1st DDL? InsouciantCoquette Classic ASP Databases 0 February 26th, 2006 11:23 PM
How to highlight search results in Word haiying Access VBA 0 July 25th, 2005 11:13 AM



All times are GMT -4. The time now is 11:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.