473,466 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Issues with Access where I am using multiple or statments and Access freezes

Trying to use multple 'or' condition and Access freezes but when I remove the 'or' condition and leave only the last set of 'Or', it works.

SELECT ....
FROM tabel1, table2, table3, table4
WHERE ((table1.xxxx=table2.xxxx And table1.xxxx=table3.xxxx And table1.xxxx=table4.xxxx) Or (table1.yyyy=table2.yyyy And table1.yyyy=table3.yyyy And table1.yyyy=table4.yyyy) Or
(table1.wwww=table2.wwww And table1.wwww=table2.wwww))

------ The below statement works if I remove the 'Or' check above ----

And (table1.[zzzz]<>table2.[zzzz] Or table1.[zzzz]<>table3.zzzz Or table1.[zzzz]<>table4.zzzz);
Nov 5 '10 #1
1 1953
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi. The simplified query you have posted does not help us here, as there is no way we can tell what might or might not be happening when you run it.

Are you sure that Access is freezing? It could be that the query is just taking a very long time to run. This can happen if you miss out joins between tables, for instance, in which case the number of rows you expect the query to deal with will be multiplied to a possibly extreme extent, preventing Access from returning anything useful to you even after a long time running.

When no joins are present you get the Cartesian Product of the tables concerned - so if table 1 had 1000 rows and table 2 10000 the product of the two would contain 10,000,000 rows.

I doubt that it is the OR part that is responsible, but I'd need to see the real query - not the altered version you've posted - even to hazard a guess at this.

To repeat, I'd check the joins - you have not shown any in the sample code, which will multiply all four tables together causing a real headache for Access in trying to run the query.

-Stewart
Nov 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: intl04 | last post by:
Are there any problems with multiple user access to the same Access database on a shared network drive? I have 'shared' chosen for 'default open mode'. As for the record locking properties, I...
5
by: | last post by:
Hi all, HttpWebRequest, and SoapHttpClientProtocol both expose a ClientCertificates property, which can hold multiple client certificates, but on the service side, it can only receive one client...
1
by: fernan | last post by:
Hi I don't know how to build a query which access to multiple databases. Example: On the same server I have DB1 and DB2 I want to SELECT TABLE FROM DB1 INTO CURSOR AND THEN I WANT TO MODIFY A...
2
by: judelakmal | last post by:
I have an application written in vb 6.0 application. It connects multiple MS Access databases sometimes. I would like to know is will this effects the performance of the application.
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
8
by: fniles | last post by:
Can I change the connection time out in VB.Net 2003 and MS Access (using OLEDbConnection) ? When I use Connect Timeout = 60 in the connectionstring, I get an error "Multiple-step OLE DB operation...
2
by: DJ Dharme | last post by:
Hi all, I am writing a multi-threaded application in c++ running on solaris. I have a file which is updated by a single thread by appending data into the file and at same time the other threads...
6
by: =?Utf-8?B?QmVu?= | last post by:
Hi all, Is there any good resource online that you can share with me about programming Access using C#. I am trying to get my feet wet with C# and vs2008. I tried looking at kb317114, it...
3
by: modernshoggoth | last post by:
G'day all, I'm trying to update a single table (containing plans for flights) with information from the same and other tables (containing info for organisations and locations). tblFlightPlans...
2
by: Blue Stone Post | last post by:
NEWBIE QUESTION How Can I Fax An Existing PDF File Via MS Fax From MS Access Using VBA? Using MS Access As A User Interface to enable users to search for various electronic records stored as...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.