I stumbled across an interesting problem. I need to query multiple access tables using a 'LIKE' query (kinda like a search engine for a website)...
Whenever I use more than one table or more than one 'LIKE' my ASP page times out.
Here is my original code:
The variable mySearch represents the value that a user would type into the search screen on the previous page.
I've tested out a bunch of scenarios:
1. Has no problems getting the results if there is only 1 record returned
2. Has no problems if no records are returned
3. Using only 1 table in the query works fine
4. OR using only 1 LIKE statement works fine
If anyone has ever come across this same problem and/or has a solution, I would really appreciate a hint...it's been driving me nutty
Thanks!
Jeannette
Whenever I use more than one table or more than one 'LIKE' my ASP page times out.
Here is my original code:
Code:
mySQL = "SELECT * FROM items, types, mediums, categories WHERE first_name LIKE '%" & mySearch & "%' OR last_name LIKE '%" & mySearch & "%' AND categories.id=categorie AND mediums.id=items.medium AND types.id=items.type"
The variable mySearch represents the value that a user would type into the search screen on the previous page.
I've tested out a bunch of scenarios:
1. Has no problems getting the results if there is only 1 record returned
2. Has no problems if no records are returned
3. Using only 1 table in the query works fine
4. OR using only 1 LIKE statement works fine
If anyone has ever come across this same problem and/or has a solution, I would really appreciate a hint...it's been driving me nutty
Thanks!
Jeannette