Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006

    Unanswered: Syntax error in FROM Clause (was "Urgent -- Please help.")

    I have programmed Outer Joins at least 50 times but never in Access and ADO. Could someone please tell me why I am getting errors?

    strSourceFolder = "D:\TEST\IMAGES\"
    strTargetFolder = "C\TEST\IMAGES\"
    Set cnGetData = CurrentProject.Connection
    Dim lngDocuments As Long
    rsGetData.CursorLocation = adUseClient
    rsGetData.Open "Select LEFT_LSP.LEFT_BEGPSN From LEFT_LFP LEFT Outer Join RIGHT_LFP WHERE LEFT_LFP.LEFT_BEGPSN=RIGHT_LFP.RIGHT.BEGPSN ", cnGetData, adOpenDynamic, adLockOptimistic

    I have been able to get the code with a 'simple sql statement'

    Why has the above not worked with the ON key statement and on the where keys are equal.

    When I use ON in my SQL, I get an error of No Value given for one or more required parameters.

    When I use a where clause, I get an error of "Syntax error in FROM Clause".

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada

    change the last period to an underscore (and change WHERE back to ON) | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts