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 6880397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:58:08+00:00 2026-05-27T04:58:08+00:00

I create a DAO.Recordset thus: Set recJoined=MyDB.OpenRecordSet( Select * From TableA Inner Join TableB

  • 0

I create a DAO.Recordset thus:

Set recJoined=MyDB.OpenRecordSet(" Select * From TableA Inner Join TableB On TableA.FieldA=TableB.FieldA")

The problem is that the Tables A and B have many fields, and some of them with the same name.

I now want to select a record with

recJoined.FindFirst FieldA="100"

This fails of course because ‘FieldA’ does not refer to a unique field.
However when I change the criteria to:

recJoined.FindFirst TableA.FieldA="100" 

I run into a ‘unknown or invalid field reference’ error.

I could specify an alias for the TableA.FieldA field of course in the Select statement, but as I need all fields from TableA and TableB and they have a lot, that would be very cumbersome indeed.

How to solve this?

  • 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-05-27T04:58:08+00:00Added an answer on May 27, 2026 at 4:58 am

    I upvoted Conrad’s answer, but I cannot accept it as it does not address my specific need: to be able to select all fields, without specifically knowing which these are, but being able to alias the Join column.

    (typically same named columns are on the join columns which typically contain the same data)

    This is true of course, but the FindFirst statement does not see it so, it requieres a unique specifier
    and raises an error.

    2 – If you must use SELECT * You can find out what the field names are first in a scratch and then use whatever the name is that the database engine assigned it and then use those result

    The name simply is FieldA without any further qualifications or prefixes. So that does not help.

    Consider that SELECT *, TableA.FieldA AS TableA_FieldA, is valid

    Yes it is! and this leads to the solution. But the resultset has the FieldA now twice: once with the Aliased name, once with the original name. The Aliased field is updatable, the original field not. Once I took care not to update the FieldA field all was fine.

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

Sidebar

Related Questions

I'm using VB6 and trying to create a DAO recordset from an array of
I need to create a decimal field in MsAccess 2003 through DAO. How do
A little background: I'm using Spring and Hibernate to create a really simple domain/dao/service
When you create a Service bean or Dao bean in your Spring applicationContext.xml file,
I would like to create a generic query from a generic class T. Is
I have DAO code which contains some JDBC with Oracle-specific syntax, for example: select
I'm attempting to create a JUnit test for my DAO object. The JUnit is
I'm trying to write simple DAO that will create entity objects based on their
I'm trying to test some DAO Classes that inherit from a Generic one, and
I want to create a Factory which returns dao-instance, depending on the Class clazz

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.