Results 1 to 2 of 2

Thread: Need Help!!! Join Error!!! Newbie

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    63

    Post

    Newbie needing assistance... Here is the error message I am recieving:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in JOIN operation.

    /888.asp, line 98

    Here is my code: dunno what is going wrong??

    <%@ LANGUAGE="VBSCRIPT" %>
    <%

    set conn = server.createobject ("adodb.connection")
    conn.open "ASPBook", "sa", "yourpassword"

    set RSDepartments = conn.Execute("SELECT CIEmpDir2.EmpWorkPhone FROM CIEmpDir2 WHERE (((CIEmpDir2.Star)>'')) ")
    %>

    <HTML>
    <HEAD>

    <%Manufacturer = Request.Form("Manufacturer")%>
    <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
    <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
    <TITLE>Visual InterDev <SELECT> Sample</TITLE>
    </HEAD>
    <BODY bgcolor="#FFFFFF">
    <p><font size="6"><strong>Auto Listing Page</strong></font></p>
    <p> </p>
    <!--METADATA TYPE="DesignerControl" startspan
    <OBJECT ID="DataCommand1" WIDTH=151 HEIGHT=24
    CLASSID="CLSID:7FAEED80-9D58-11CF-8F68-00AA006D27C2">
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_ExtentX" VALUE="3986">
    <PARAM NAME="_ExtentY" VALUE="635">
    <PARAM NAME="_StockProps" VALUE="0">
    <PARAM NAME="DataConnection" VALUE="DataConn">
    <PARAM NAME="CommandText" VALUE="SELECT CIEmpDir2.Location FROM CIEmpDir2 WHERE (((CIEmpDir2.Star)>''))">
    </OBJECT>
    -->
    <%
    Set DataConn = Server.CreateObject("ADODB.Connection")
    DataConn.ConnectionTimeout = Session("DataConn_ConnectionTimeout")
    DataConn.CommandTimeout = Session("DataConn_CommandTimeout")
    DataConn.Open "ASPBook", "sa", "yourpassword"
    Set cmdTemp = Server.CreateObject("ADODB.Command")
    Set DataCommand1 = Server.CreateObject("ADODB.Recordset")
    cmdTemp.CommandText = "SELECT CIEmpDir2.Location FROM CIEmpDir2 WHERE (((CIEmpDir2.Star)>''))"
    cmdTemp.CommandType = 1
    Set cmdTemp.ActiveConnection = DataConn
    DataCommand1.Open cmdTemp, , 0, 1
    %>
    <!--METADATA TYPE="DesignerControl" endspan-->
    <p>Select the manufacturer:</p>
    <FORM METHOD="POST" Action="888.asp" NAME="form1">
    <SELECT LANGUAGE="JavaScript" ONCHANGE="form1.submit()" SIZE=1 NAME="Manufacturer">

    <!-- Fill the <SELECT> list with values from the Manufacturers table -->
    <% Do While Not DATACommand1.EOF %>
    <%If Manufacturer = DataCommand1("Location") then%>
    <OPTION SELECTED>
    <%= DataCommand1("Location")%>
    </option>
    <%Else%>
    <OPTION>
    <%= DataCommand1("Location")%>
    </option>
    <%End if%>
    <% DataCommand1.MoveNext
    Loop %>

    </SELECT>
    </FORM>
    <%if Manufacturer = "" then Manufacturer = "HEADQUARTERS" %>
    <p><strong>Cars Offered by <%=Manufacturer%> :</strong></p>
    <table border="1">
    <tr>
    <td align="center"><strong>Location </strong></td>
    <td align="center"><strong>Store Id </strong></td>
    <td align="center"><strong>Store Phone </strong></td>
    <td align="center"><strong>Store Fax </strong></td>
    <td align="center"><strong>Manager's Email Address </strong></td>
    </tr>
    <!--METADATA TYPE="DesignerControl" startspan
    <OBJECT ID="DataCommand2" WIDTH=151 HEIGHT=24
    CLASSID="CLSID:7FAEED80-9D58-11CF-8F68-00AA006D27C2">
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_ExtentX" VALUE="3986">
    <PARAM NAME="_ExtentY" VALUE="635">
    <PARAM NAME="_StockProps" VALUE="0">
    <PARAM NAME="DataConnection" VALUE="DataConn">
    <PARAM NAME="CommandText" VALUE="SELECT CIEmpdir2.`Location`, CIEmpdir2.Id, CIEmpDir2.EmpWorkPhone, CIEmpdir2.EmpWorkFax, CIEmpdir2.EmailAddress FROM CIEmpdir2, (CIEmpdir2.`Location` = '[Manufacturer]')">
    </OBJECT>
    -->
    <%
    Set DataConn = Server.CreateObject("ADODB.Connection")
    DataConn.ConnectionTimeout = Session("DataConn_ConnectionTimeout")
    DataConn.CommandTimeout = Session("DataConn_CommandTimeout")
    DataConn.Open "ASPBook", "sa", "yourpassword"
    Set cmdTemp = Server.CreateObject("ADODB.Command")
    Set DataCommand2 = Server.CreateObject("ADODB.Recordset")
    cmdTemp.CommandText = "SELECT CIEmpdir2.`Location`, CIEmpdir2.Id, CIEmpDir2.EmpWorkPhone, CIEmpdir2.EmpWorkFax, CIEmpdir2.EmailAddress FROM CIEmpdir2, (CIEmpdir2.`Location` = '" & Manufacturer & "')"
    cmdTemp.CommandType = 1
    Set cmdTemp.ActiveConnection = DataConn
    DataCommand2.Open cmdTemp, , 0, 1
    %>
    <!--METADATA TYPE="DesignerControl" endspan-->

    <tr>
    <td><input type="text" name="Location" size="20" value="<%= DataCommand2("Location") %>"></td>
    <td><input type="text" name="Id" size="20" value="<%= DataCommand2("Id") %>"></td>
    <td><input type="text" name="EmpWorkPhone" size="20" value="<%= DataCommand2("EmpWorkPhone") %>"></td>
    <td><input type="text" name="EmpWorkFax" size="20" value="<%= DataCommand2("EmpWorkFax") %>"></td>
    <td><input type="text" name="EmailAddress" size="20" value="<%= DataCommand2("EmailAddress") %>"></td>
    </tr>

    </table>
    </BODY>
    </html>



  2. #2
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    Post

    = "SELECT CIEmpdir2.`Location`, CIEmpdir2.Id, CIEmpDir2.EmpWorkPhone, CIEmpdir2.EmpWorkFax, CIEmpdir2.EmailAddress FROM CIEmpdir2, (CIEmpdir2.`Location` = '" & Manufacturer & "')"

    In the above SQL statement .. after FROM
    you have a table name but it is followed
    by what looks like a condition which has
    to be after WHERE statement..

    i hope this will help you..
    good luck

    sarath

Posting Permissions

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



Click Here to Expand Forum to Full Width