Print Page | Close Window

Query is too complex

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12797
Printed Date: 30 March 2026 at 11:01pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Query is too complex
Posted By: Mattblack
Subject: Query is too complex
Date Posted: 02 December 2004 at 6:55am
Folks,
 
got another problem.  I WAS running a query on a database and kept opening a recordset with a criteria (simple field=data), then closing it, then looping back round and reopening it with new data for the same field.
 
The data was in an array, and with all the opening and closing of recordsets was running VERY slow.  Sometimes up to 3000 entries in the array.
 
So, i approached it like this....
Select table where field = data1 or field = data2 or field = data3.... etc.
 
If theres  anything over about 40/50 entries to search for i get this....
Microsoft JET Database Engine error '80004005'
Query is too complex.
Im well confused.  I feel like im in a no win situation.  How can i do the above so it runs quick or correct the "Too complex" issue???
 
Many thankies in advance



Replies:
Posted By: Mattblack
Date Posted: 02 December 2004 at 6:58am
if i run the query in access i get the error: System Resource Exceeded
SQL Server isn't an option yet im affraid either.


Posted By: michael
Date Posted: 02 December 2004 at 9:33am
Yeah, acccess sucks Tongue try the following:
Select * from yourtable where field IN (data1,data2,data3,data4.....)


-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Mattblack
Date Posted: 02 December 2004 at 9:49am
haha, ur a genious! It worked!
3000 datax's in there too!  :-D  Im well happy now.  I promise i will eventually know what im doing!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net