Thread: ASP and Access related question
03-10-04, 17:30 #1Registered User
- Join Date
- Mar 2004
Unanswered: ASP and Access related question
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 'fulltext ALike '%%%''.
/apoyos2.asp, line 54
Am I barking up the wrong tree here? Any help would be appreciated!
P.S. Am using Dreamweaver MX 2004
03-11-04, 13:38 #2Registered User
- Join Date
- Jan 2004
Re: ASP and Access related question
Sometimes we make syntax errors in our strings when using VB, or VBScript etc...
I recommend that you print your query to the web page then cut-and-paste that query and try running it directly in Access. You will see if you are making any syntax errors or what the real error is with your query.In abundance of water only the fool is thirsty. Bob Marley.