"Ambiguous outer joins" error when looping through querydefs
am 08.11.2007 11:01:49 von Michael Scott
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
>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.
Re: "Ambiguous outer joins" error when looping through querydefs
am 08.11.2007 12:00:33 von Bob Quintal
Michael Scott wrote in
news:1194516109.158722.192940@y27g2000pre.googlegroups.com:
> 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
>
>>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
Re: "Ambiguous outer joins" error when looping through querydefs
am 08.11.2007 21:44:30 von Michael Scott
> When you test the querydef, Access parses the SQL. You just need an
> 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.