A
Alister
The problem: After upgrading my database to sql server 2005 from sql server
2000, the ORDER BY clause from SQL views is ignored in MS Access 2K and 2003.
Having read several articles about this is seems that SQL Server 2005 is
more optimised and therefore it ignores the ORDER BY in the SELECT Statement.
If I change the recordsource property to SELECT * FROM (name of the view)
ORDER BY (fields) then the order of the row are correct, however I then get
an error after inserting a row which says: Your row was added to the
database but will not be viewable as it does not satisfy the underlying
criteria.
Question: How do I move forward from here? I have only been able to
resolve the issue by copying the select statement (together with the ORDER By
clause) from the view into the record source property on the form.
This is not a neat solution and I therefore would like to know if anyone has
found a better solution.
2000, the ORDER BY clause from SQL views is ignored in MS Access 2K and 2003.
Having read several articles about this is seems that SQL Server 2005 is
more optimised and therefore it ignores the ORDER BY in the SELECT Statement.
If I change the recordsource property to SELECT * FROM (name of the view)
ORDER BY (fields) then the order of the row are correct, however I then get
an error after inserting a row which says: Your row was added to the
database but will not be viewable as it does not satisfy the underlying
criteria.
Question: How do I move forward from here? I have only been able to
resolve the issue by copying the select statement (together with the ORDER By
clause) from the view into the record source property on the form.
This is not a neat solution and I therefore would like to know if anyone has
found a better solution.