I am using borland's JBuilder X to connect to an access database (existing
project) via odbc.
The problem is that my queries don't like the "GROUP BY" clause.
If I omit the GROUP BY clause, the table fills up correctly,
but if I include it, the query fails, with no indication of why.
I suspect that the odbc driver for access doesn't support advanced queries.
But, is there anything else I may have missed?
regards,
DarylH.
//--- code starts here --->
void LoadVersionsDisplay(int main_id)
{
String strSQL = "SELECT VersionNo, LastUpdated FROM Table " +
" WHERE Table.MainID="+ String.valueOf(main_id)
+ " GROUP BY VersionNo " // note space before 'G'
;
VersionQuery.close(); // reuse this guy many times (it works)
VersionQuery.setQuery(
new com.borland.dx.sql.dataset.QueryDescriptor(
ProjectDM.getMainDatabase(), strSQL, null, false,
Load.ALL ) );
VersionQuery.executeQuery();
VersionsTable.setDataSet( VersionQuery );
}
org - 30 Mar 2004 02:33 GMT
MY BAD!!
Thanks, folks, I solved my problem.
Stoopid, basic SQL pragmatics.
select should read: "SELECT VersionNo, max(LastUpdated) AS LastModified ..."
It helps just to ask the question.
regards,
DarylH.
> I am using borland's JBuilder X to connect to an access database (existing
> project) via odbc.
[quoted text clipped - 26 lines]
> VersionsTable.setDataSet( VersionQuery );
> }
org - 30 Mar 2004 02:35 GMT
MY BAD!!
Thanks, folks, I solved my problem.
Stoopid, basic SQL pragmatics.
select should read: "SELECT VersionNo, max(LastUpdated) AS LastModified ..."
It helps just to ask the question.
regards,
DarylH.
> I am using borland's JBuilder X to connect to an access database (existing
> project) via odbc.
[quoted text clipped - 26 lines]
> VersionsTable.setDataSet( VersionQuery );
> }