problem with GROUP BY...

From: org (dhegyi_at_telus.net)
Date: 03/30/04


Date: Tue, 30 Mar 2004 00:25:43 GMT

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 );
}



Relevant Pages

  • Re: Too Many Client Tasks
    ... trying to run 204 queries at the same time is more than the ODBC driver ... it's probably worth asking in an Excel or ODBC ... >pointed it to the Access database and the data. ... >Any idea how what is going wrong or what I can do to get this spreadsheet to ...
    (microsoft.public.access.externaldata)
  • Re: Word 2000/2002 - Proper Mail Merge steps for ODBC?
    ... > Document to connect to a Secured Access Database, ... using the ODBC provider for OLEDB. ... they have a .dsn extension. ... directly (in the Open/Select Data Source dialog box). ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Simple query executes fast but renders slow...
    ... After you restart Access and run your query, JET will write an extensive log ... "SQL Queries for Mere Mortals" ... >>Then I wrote queries and reports based on the local ... So, ODBC, right? ...
    (microsoft.public.access.queries)
  • Re: Need ODBC for every front end, or just server?
    ... > Backend, do I lose ALL benefit of having the application split into Front ... used only for the update from ODBC. ... Queries can be run from VB Script. ... > on the server, and, in response to some other signal ...
    (microsoft.public.access.externaldata)
  • Re: oledb-group by
    ... SQL92 rules in queries with GROUP BY. ... > then I set engine behavior to 70 just after opening connection. ... Since the latest ODBC driver only has the SQL ... >> select band, title,; ...
    (microsoft.public.fox.vfp.dbc)