Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2004, 12:24 AM
Authorized User
 
Join Date: Jul 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Simple SQL Question

Why does THIS SQL WORK?:
 objCommand.CommandText = "SELECT Title, Director FROM AllMovies WHERE Director LIKE 'Quentin Tarantino' OR Director LIKE 'Francis Coppola'"
But THIS SQL Does NOT work?: (NOTE The use of the "*" as a wildcard)
  objCommand.CommandText = "SELECT Title, Director FROM AllMovies
WHERE Director LIKE 'Quentin*' OR Director LIKE 'Francis*'"
  objCommand.CommandType = adCmdText

I am hitting against an ACCESS Database


Cmarek
__________________
Cmarek
 
Old July 10th, 2004, 04:11 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It depends a bit what you use to connect to Access. I believe in an Access query directly, this will work.

If you're accessing the database through ADO, use the % symbol instead of the * as the wild card character.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Question JEHalm BOOK: Beginning Access VBA 0 December 29th, 2005 10:42 AM
Simple Question - SQL Statement mrideout BOOK: Beginning ASP.NET 1.0 2 January 11th, 2005 09:28 AM
Very Simple SQL Question?? mrideout BOOK: Beginning ASP.NET 1.0 3 September 20th, 2004 08:07 PM
Simple Question dinosaur_uk VB.NET 2002/2003 Basics 1 September 10th, 2004 09:43 AM
Simple Question - SQL for retrieving different row wanda46 Access 5 June 9th, 2004 01:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.