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 January 23rd, 2004, 03:19 AM
Authorized User
 
Join Date: Oct 2003
Location: LAhore, Punjab, Pakistan.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to salman
Default Finding records containing similar text

I want to retrieve records from an Access database containing text given by the user in a text box. For example if i write 'asad' in the text box then all the records containing the text 'asad' will be displayed. I am using ASP with Access database.
I have used LIKE in the query but that won't work.
plz tell me how can i do this?

Reply With Quote
  #2 (permalink)  
Old January 23rd, 2004, 06:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Sydney, NSW, Australia.
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are using the Jet OLEDB Provider, use % not * as a wildcard, eg:

strSQL = _
   "SELECT Field1, Field2, Field3 " & _
   "FROM myTable " & _
   "WHERE SearchField LIKE '%asad%'"

Cheers
Ken

Microsoft MVP - Windows Server (IIS)
www.adOpenStatic.com
Reply With Quote
  #3 (permalink)  
Old November 29th, 2004, 12:13 PM
Registered User
 
Join Date: Jun 2003
Location: , London, United Kingdom.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Ken,

Is there a simple way to make the search non case-sensitive?

Congratulations on your MVP by the way. Well done. I have bought the IIS book and it really is great.

Patrick

Quote:
quote:Originally posted by KenSchaefer
 If you are using the Jet OLEDB Provider, use % not * as a wildcard, eg:

strSQL = _
"SELECT Field1, Field2, Field3 " & _
"FROM myTable " & _
"WHERE SearchField LIKE '%asad%'"

Cheers
Ken

Microsoft MVP - Windows Server (IIS)
www.adOpenStatic.com
The earth has music for those who listen!
Reply With Quote
  #4 (permalink)  
Old November 30th, 2004, 10:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Patrick,

The LIKE operator does that. Ken's solution should work the way you wanted.

Cheers!

_________________________
- Vijay G
Strive for Perfection
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
problem in updating records & finding records naveed77 VB Databases Basics 1 January 16th, 2007 12:12 PM
problem in updating records & finding records naveed77 VB How-To 1 January 16th, 2007 12:10 PM
VB SQL search similar records Derek_05 Access VBA 1 March 24th, 2006 08:19 PM
Finding Records Itzamna VB Databases Basics 3 June 7th, 2005 10:44 AM
finding total no. of records reshmisworld Classic ASP Databases 4 July 24th, 2003 06:35 PM



All times are GMT -4. The time now is 01:30 AM.


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