CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Microsoft OLE DB Provider for SQL Server error '80040e14' 'JOI' is not a recognized join option.

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    156
  • Date Created
    Monday, January 2, 2012
  • Last Updated
    Wednesday, June 20, 2012
  • This Article Has been Viewed
    2126 times
  • Short Desc
    When creating JOIN Statements within SQL Server, when copied out and placed in your project, you might inadvertently erase a letter from part of the statement.
  • Details
    When you create the SQL Query within SQL Server, and then copy it out into your project, you might inadvertently remove one of the letters, when you are fixing the code to properly run within your ASP Classic or ASP.NET page.
    In that case, you will receive the following error.

     

    Microsoft OLE DB Provider for SQL Server error '80040e14'
    'JOI' is not a recognized join option.
    /About.asp, line 49
  • Recreate Issue
    To recreate this issue.

    The following if a SQL Server generated code.

    <%

    SELECT TOP (20) Categories.CatName, SubCategories.SCID
    FROM Categories INNER JOI
    SubCategories ON Categories.MCID = SubCategories.MCID

    %>


    Looking at the code, on line #2, you can see the INNER JOI, however, it is missing the N of from JOIN.
  • Resolve Issue
    To resolve this issue.
    This is rather simple, just add the N to the end of the JOI to complete the word

    <%

    SELECT TOP (20) Categories.CatName, SubCategories.SCID
    FROM Categories INNER JOIN
    SubCategories ON Categories.MCID = SubCategories.MCID

    %>


    The code will look like this when added to your ASP Classic or ASP.NET page.

    <%

    sql.commandtext="SELECT TOP (20) Categories.CatName, SubCategories.SCID FROM Categories INNER JOIN SubCategories ON Categories.MCID = SubCategories.MCID"

    %>