I have had some strange problems when getting data from an MSAccess97 db.
The query is in this form (generated dynamicly by the app);

SELECT FieldA, FieldB, FieldN FROM SomeView
WHERE FieldC = Something
ORDER BY FieldA, FieldN

The fields selected may vary as well as how the where and order By clauses
looks like. The query will always be a valid one, though. Sometimes (please
don't ask why) no records are wanted, hence the whereclause is replaced with
'where 1=2'.

This usually works exact as wanted but sometimes goes wrong IF an order by
coexists with 'where 1=2' (not otherwise).

If the failing query is run through ADO the error returned says 'The query
is too complex'. If copied and run directly in MSAccess i causes MSAccess
to crasch completely by referencing an invalid memory address (occurs in

If I simply remove one of the fields selected, or the order by, in the query
it runs smoothly. I haven't found any logic in this behaviour, but a certain
query that crashes, will allways do, not just randomly.

I then updated msjet35 with the latest availible servicepack, -A slight difference!
If the failing query is pasted into the MSAccess sqlpane and executed it
fails. If saved first and then executed, it works(!) With ADO it is still
the same.

In the past I had a similar problem with Access. A union query with an order
by crashed if only 1 record was returned. With 2 or more records it worked

Anyone who has come across this?