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:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old August 15th, 2003, 02:30 AM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Cunning Linguist
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Jul 2003
Location: I used to live at home, now I stay at the house
Posts: 9,852 ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)  Folding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner Folder
Time spent in forums: 3 Months 2 Weeks 4 Days 12 h 35 m 44 sec
Reputation Power: 721
Facebook
Splitting up a search string in ASP...

Hey people... I've made my first ASP website that interacts with a detabase. All fairly standard: it can display the entire contents of the db, you can input new items, update and delete items, and I've just started making a search page...[!]

It all works fine if the user just searches with one word, but if they enter more than one word and then press search, I don't know how to split their searchstring up into [an array of?] different strings to search the db with.

Is this even the easiest way to do it, or am I just wasting my time?

Any help please!!!!!

Cheers.
__________________
Support requests via PM will be ignored!
Sites: Route of Queue | Sinthetic - Alternative UK Hiphop
Read These: The General Rules Thread | The General FAQ Thread | NEW USERS - How to post a question

Sign up with Matched.co.uk and earn up to £15 per website every month!


Reply With Quote
  #2  
Old August 15th, 2003, 05:39 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 54 sec
Reputation Power: 6
Send a message via AIM to unatratnag
dim A
A = split(strInput)


this will split it on spaces

A = split(strInput, ",")

this will split on commas etc.

strSQL = "select * from table where "
for each item in A
strSQL = strSQL + "column LIKE '%" & item & "%' AND "
next
strSQL=strSQL & "and prikey is NOT null"

switch the AND to OR if you want.........depends on what you're looking for
hope this helps, let me know if you need more help

Reply With Quote
  #3  
Old August 15th, 2003, 10:00 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
The only problem with unatratnag's approach is that you'll end up having to AND's next to each other inside your string

;-)

</grin>

Vlince

Reply With Quote
  #4  
Old August 15th, 2003, 10:03 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 54 sec
Reputation Power: 6
Send a message via AIM to unatratnag
eh what?...are?

.....ahhh cripes, yes, remove that last AND, hehe, thanks vlince
make it
Code:
strSQL=strSQL & "prikey is NOT null" 

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Splitting up a search string in ASP...


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 | 
  
 

ibm




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