Unanswered: Shoud this question be here or somewhere else? (subquery)
Hi! I have a database (MS Access) that I access from an ASP-page. The page contains results from a query based on a session variable set by the login page. In this case, the session variable contains the string "luxury". The query selects all records where the field 'fulltext' contains the string "luxury" and presents them to me on this page. So far no problems.
I have - however - a form on this same page, where I want people to be able to search within the already selected records. I've tried to do a statement like:
SELECT * FROM table1 WHERE fulltext LIKE '%txt%' IN (SELECT cat,magazine,fulltext
WHERE cat LIKE '1' AND magazine LIKE '%md%' AND (fulltext LIKE '%wds%'))
In this example, variables 'txt' and 'md' come from the form on the page, whereas 'wds' is the string that I set up as a session variable.
When testing this statement, I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Invalid Memo, OLE, or Hyperlink Object in subquery 'textofull ALike '%%%''.
/apoyos2.asp, line 54
Am I barking up the wrong tree here? Any help would be appreciated!