Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8822191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:02:53+00:00 2026-06-14T06:02:53+00:00

I am executing queries from Access 2010 on an Interbase database via ODBC (Easysoft)

  • 0

I am executing queries from Access 2010 on an Interbase database via ODBC (Easysoft) ver.7. Everything works fine except when i come to fire a Union query such as this:

SELECT TRIP.TRIPDATE, RESERVATION.BOOKINGREF, RESERVATION.LEADNAME, TRIP.DRIVERID, RESERVATION.STATUS, RESERVATION.DATECANCELLED, TRIP.TRANSPORTTYPEID
FROM TRIP INNER JOIN RESERVATION ON TRIP.TRIPID = RESERVATION.ARRIVALTRIPID
WHERE (((TRIP.TRIPDATE) Between #2/1/2012# And #2/29/2012#) AND ((TRIP.DRIVERID)=2) AND ((RESERVATION.DATECANCELLED) Is Null) AND ((TRIP.TRANSPORTTYPEID)=12))


UNION 

SELECT TRIP.TRIPDATE, RESERVATION.BOOKINGREF, RESERVATION.LEADNAME, TRIP.DRIVERID, RESERVATION.STATUS, RESERVATION.DATECANCELLED, TRIP.TRANSPORTTYPEID
FROM TRIP INNER JOIN RESERVATION ON TRIP.TRIPID = RESERVATION.DEPARTURETRIPID
WHERE (((TRIP.TRIPDATE) Between #2/1/2012# And #2/29/2012#) AND ((TRIP.DRIVERID)=2) AND ((RESERVATION.DATECANCELLED) Is Null) AND ((TRIP.TRANSPORTTYPEID)=12));

When I run this query from Access I get

“ODBC –call failed, [Easysoft][Interbase]Dynamic SQL Error, SQL error
code = -104, Token unknown -line1,char 0, ((#-104)”

When running the select queries on their own they work fine but when joined via UNION I get this error.

Any help would be appreciated.

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:02:54+00:00Added an answer on June 14, 2026 at 6:02 am

    You don’t mention if your query is a passthrough query or if you are using linked ODBC tables in an Access query.

    If you are using a normal Access query

    Normal Access Query

    When using linked ODBC tables in a normal Access query, the Access data engine will rewrite the queries as necessary to make them compatible with the other database engine.
    Sometimes, it can fail though.

    1. Make sure each SELECT query works and returns correct data independently.

    2. Try a simpler UNION query to make sure that the issue comes from the UNION keyword itself.

    3. Try UNION ALL

    4. Try using a pass-through query instead.

    If you are using a pass-through query

    Pass-Through query

    Pass-through queries are send verbatim to the ODBC engine, and Access just collects the results without rewriting the query itself.

    1. Make sure each SELECT query works as a pass-through query and returns correct data independently.

    2. Make sure that the literal dates are properly formatted for Interbase SQL.
      The ones you use are correct for Access SQL, but different databases accept different formats.

    3. Try a simpler UNION query using simple SELECT statements involving 1 or 3 fields only.

    4. Try UNION ALL.

    5. You don’t show it in your question, but just in case, if you used an ORDER BY statement, you have to wrap the UNION query.

    6. Try to cast the data types of your fields. It may be that some fields’s data are incorrectly interpreted and that the union fails because it assumes that the data retrieved is of different types.

    7. Try using a standard Access query instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to C#. I was executing some select queries from database tables
I'm executing some complex queries in my app by hand via PDO, using $pdo
Is there native support for executing queries in parallel from a stored procedure in
When executing batch queries via JDBC to pgbouncer, I get the following error: org.postgresql.util.PSQLException:
What would be considered the best practices when executing queries on an SQLite database
I have a MySQL/Slave Setup everyday we are executing queries on slave machine for
Suppose I am executing several queries on the server using mysql_query . The results
I'm running the following statement to see what queries are executing in sql server:
I've noticed that my code errors out on sqlWrite.ExecuteNonQuery(); after executing 200 Insert queries
I have a problem with executing large number of queries. I need to execute

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.