ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 19th, 2003, 10:33 AM
Jonny5uk Jonny5uk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 62 Jonny5uk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 9 m 10 sec
Reputation Power: 6
Keyword Search Problem

Hi guys,

I'm having a small problem with a keyword search not functioning correctly.

Here's the scenario .... I'm using ASP in DWMX, with Access 2000 and am simply using a multiple search page where the user can select various options or just one option. One of these boxes is a keyword box named 'Des' (for description) This is named the same in the database.

On the results page I have a recordset and have set up my variables. One variable is called sSchool which refers to simply a drop down on the search page and the other is the sDes variable which refers to a text box for entering keywords. The variable code for the keyword field is ...

name = sDes
default value = %how%
runtime value = request.form("Des")

My SQL in the advanced box is....

SELECT *
FROM Links
WHERE Des LIKE 'sDes' AND School LIKE 'sSchool'

I have tried modifying this, mainly in the default value column i.e. just having % but still no luck.

The School bit works fine, just not he keyword bit.

Any ideas where I'm going wrong??

Any help would be much appreciated as I've spent hours!!!

Appologies if this is slightly in the wrong forum area, but wasn't quite sure where best to put it.

Thanks in advance

Jon

Reply With Quote
  #2  
Old May 21st, 2003, 12:54 AM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
try the following

Code:
Dim querystring
querystring = "SELECT *FROM Links WHERE Des LIKE '%" & sDes & "%' AND School LIKE '%" & sSchool & "%'"
__________________
How can I soar like an eagle when
I'm flying with turkey's?

Reply With Quote
  #3  
Old May 21st, 2003, 04:54 AM
Jonny5uk Jonny5uk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 62 Jonny5uk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 9 m 10 sec
Reputation Power: 6
Thanks for the reply....

I've managed to sort it now.

I tried using your line of code but is didn't seem to like the use of the '%" bits for some reason. Which is odd as I'm sure I have used that expression before in a previous project.

Anyways if you interested, here's my final SQL code...

SELECT Created, Des, Title, School, Language
FROM Links
WHERE School LIKE 'varSchool' AND Language LIKE 'varLanguage' AND (Des LIKE '%varSearch%' OR Title LIKE '%varSearch%')

Thanks again

Jon

Reply With Quote
  #4  
Old May 21st, 2003, 09:28 AM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
glad you got it sorted

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Keyword Search Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway