Connecting Tech Pros Worldwide Help | Site Map

"Ambiguous outer joins" error when looping through querydefs

  #1  
Old November 8th, 2007, 10:05 AM
Michael Scott
Guest
 
Posts: n/a
This is driving me nuts. Can anyone help?

I have a program which searches for and analyses Access databases
across a corporate network. At one point in the code I am looping
quickly through all the querydefs in the target database to give an
idea of what we're dealing with:

For Each qdf In dbsDiscoveredDatabase.QueryDefs
If Left(qry.Connect, 4) = "ODBC" Then
mblnODBC = True
End If
Next qdf
Quote:
>From time to time this produces Error 3258 "The SQL statement could
not be executed because it contains ambiguous outer joins". I know
what this error message usually means, and how to rectify it, but in
this instance it is baffling me. Am I somehow trying to run the query
by looking at its Connect property?

This happens very infrequently, but I have a feeling it might be
limited to MDE files. Is that a possibility?

Thanks in advance for any help and suggextions.

  #2  
Old November 8th, 2007, 11:55 AM
Bob Quintal
Guest
 
Posts: n/a

re: "Ambiguous outer joins" error when looping through querydefs


Michael Scott <michael.scott@dsl.pipex.comwrote in
news:1194516109.158722.192940@y27g2000pre.googlegr oups.com:
Quote:
This is driving me nuts. Can anyone help?
>
I have a program which searches for and analyses Access databases
across a corporate network. At one point in the code I am looping
quickly through all the querydefs in the target database to give an
idea of what we're dealing with:
>
For Each qdf In dbsDiscoveredDatabase.QueryDefs
If Left(qry.Connect, 4) = "ODBC" Then
mblnODBC = True
End If
Next qdf
>
Quote:
>>From time to time this produces Error 3258 "The SQL statement could
not be executed because it contains ambiguous outer joins". I know
what this error message usually means, and how to rectify it, but in
this instance it is baffling me. Am I somehow trying to run the query
by looking at its Connect property?
>
This happens very infrequently, but I have a feeling it might be
limited to MDE files. Is that a possibility?
>
Thanks in advance for any help and suggextions.
>
When you test the querydef, Access parses the SQL. You just need an
error handler that does a resume next on error 3258.





--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

  #3  
Old November 8th, 2007, 08:45 PM
Michael Scott
Guest
 
Posts: n/a

re: "Ambiguous outer joins" error when looping through querydefs


When you test the querydef, Access parses the SQL. You just need an
Quote:
error handler that does a resume next on error 3258.
Thanks very much! I had already added code to do just that, as a
workaround, but it's good to know that that is the solution.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Ambiguous outer joins" error when looping through querydefs Michael Scott answers 1 November 9th, 2007 09:25 PM
"Ambiguous outer joins" error when looping through querydefs Michael Scott answers 0 November 8th, 2007 10:05 AM
"Ambiguous outer joins" error when looping through querydefs Michael Scott answers 0 November 8th, 2007 10:05 AM