epidos
Posts: 20
|
| Posted: 12/23/2006, 12:02 PM |
|
If I have only 1 table and use the group by then it works but as soon as there is another table then it just keeps giving this error:
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/ArticleCMS/Classes.asp, line 3308
I even generated the grid with grid builder using the quary builder and it is exactly the same result.
|
 |
 |
Edd
Posts: 547
|
| Posted: 12/23/2006, 4:24 PM |
|
This means that your SQL is incorrect, you pobably have a field in your select that is not in your group statement.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
epidos
Posts: 20
|
| Posted: 12/23/2006, 7:09 PM |
|
Quote Edd:
This means that your SQL is incorrect, you pobably have a field in your select that is not in your group statement.
Edd
What do you mean?
This is the SQL:
SELECT *
FROM Articles LEFT JOIN users ON
Articles.ArticleAuthor = users.user_id
GROUP BY Articles.ArticleAuthor
in the Grid, I don't even show anything except "Articles.ArticleAuthor" and it generates error.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 12/24/2006, 11:36 PM |
|
I think that this SQL is invalid. For example it is not possible to select all fields (*) when using GROUP BY. Try it in MS Access.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Edd
Posts: 547
|
| Posted: 12/25/2006, 3:19 PM |
|
Peter is correct you must state all columns that are to be grouped in the select as well as the group by statement
Example
SELECT column1, column2, ... column_n, aggregate_function (expression)
FROM tables
WHERE predicates
GROUP BY column1, column2, ... column_n;
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |