Microsoft Access ODBC and queries written in Java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Microsoft Access ODBC and queries written in Java

  1. #1
    Richard Guest

    Microsoft Access ODBC and queries written in Java


    I am currently using IBM Visual Age for Java. I have created a servlet that
    connects to a Microsoft Access database. I was wondering what is the correct
    syntax to pass a query with a JOIN statement and a where clause.
    This an example of the query.

    s.executeQuery("SELECT [QPOA].universalAcc, [CRDB].lName, [CRDB].fName, [QPOA].branch,
    [QPOA].accountNumber, "
    +"[CRDB].fName from CRDB INNER JOIN QPOA ON [CRDB].universalAcc = [QPOA].universalAcc
    where [(QPOA].[accountNumber]=\"12345\";");
    Any help would be appreciated

  2. #2
    Paul Clapham Guest

    Re: Microsoft Access ODBC and queries written in Java

    Use Access's query designer to create a query joining the files, using
    selections, and so on. Then switch to SQL view to get SQL syntax that
    Access can understand.

    PC2

    "Richard" <dolostone@yahoo.com> wrote in message
    news:3aef1bbb$1@news.devx.com...
    >
    > I am currently using IBM Visual Age for Java. I have created a servlet

    that
    > connects to a Microsoft Access database. I was wondering what is the

    correct
    > syntax to pass a query with a JOIN statement and a where clause.
    > This an example of the query.
    >
    > s.executeQuery("SELECT [QPOA].universalAcc, [CRDB].lName, [CRDB].fName,

    [QPOA].branch,
    > [QPOA].accountNumber, "
    > +"[CRDB].fName from CRDB INNER JOIN QPOA ON [CRDB].universalAcc =

    [QPOA].universalAcc
    > where [(QPOA].[accountNumber]=\"12345\";");
    > Any help would be appreciated




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center