Question
Access crashing over Union clause?
Hi,
I'm using several rather complex SQL statements with an Access database.
They look like the following
select Forums.ID from Forums where Forums.boolPublish <> 0 and Forums.ID not
in (select Forums.ID from Forums inner join ForumUserCat on
ForumUserCat.numForumID = Forums.ID where Forums.boolPublish <> 0) union
select Forums.ID from Forums where Forums.boolPublish <> 0 and
Forums.boolRestrictedAccess <> 0 and Forums.ID in (select Forums.ID from
Forums inner join ForumUserCat on ForumUserCat.numForumID = Forums.ID where
ForumUserCat.numUserCatID in (3,8,13,27,28,32,41))
These type of statements are built dynamically by my webapplication, so
there are slight variations in the exact statement.
Usually they run fine, but every now and then running this type of query
results in an error of type "An exception occurred".
I think this may have something to with the the Union, in that the query may
be too complex for Access to handle.
Can this be the case? Or is there an other explanation for these exception
errors?
Regards, Marja
I'm using several rather complex SQL statements with an Access database.
They look like the following
select Forums.ID from Forums where Forums.boolPublish <> 0 and Forums.ID not
in (select Forums.ID from Forums inner join ForumUserCat on
ForumUserCat.numForumID = Forums.ID where Forums.boolPublish <> 0) union
select Forums.ID from Forums where Forums.boolPublish <> 0 and
Forums.boolRestrictedAccess <> 0 and Forums.ID in (select Forums.ID from
Forums inner join ForumUserCat on ForumUserCat.numForumID = Forums.ID where
ForumUserCat.numUserCatID in (3,8,13,27,28,32,41))
These type of statements are built dynamically by my webapplication, so
there are slight variations in the exact statement.
Usually they run fine, but every now and then running this type of query
results in an error of type "An exception occurred".
I think this may have something to with the the Union, in that the query may
be too complex for Access to handle.
Can this be the case? Or is there an other explanation for these exception
errors?
Regards, Marja
