Results 1 to 2 of 2

Thread: Microsoft VBScript compilation error '800a0409' Unterminated string constant

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    63

    Post

    Newbie needing assistance... Dunno what to do next... I am attempting a query on line 95...

    Error message is:

    Microsoft VBScript compilation error '800a0409'

    Unterminated string constant

    /888.asp, line 95

    cmdTemp.CommandText = "SELECT CIEmpdir2.`Location`, Stores.Stores_ID, '<% response.write RSDepartments
    ------------------------------------------------------------------------------------------------------^


    Code is as follows:

    <%@ 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 &ltSELECT&gt 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`, Stores.Store_ID, '<% response.write RSDepartments %>', Stores.WFax, Stores.MGREmail FROM Stores, CIEmpdir2 WHERE Stores.ID = CIEmpdir2.ID AND (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`, Stores.Stores_ID, '<% response.write RSDepartments %>', Stores.WFax, Stores.MGREmail FROM Stores, CIEmpdir2 WHERE Stores.ID = CIEmpdir2.ID AND (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="Stores_Id" size="20" value="<%= DataCommand2("Stores_Id") %>"></td>
    <td><input type="text" name="WPhone" size="20" value="<%= DataCommand2("<% response.write RSDepartments %>") %>"></td>
    <td><input type="text" name="WFax" size="20" value="<%= DataCommand2("WFax") %>"></td>
    <td><input type="text" name="MGREmail" size="20" value="<%= DataCommand2("MGREmail") %>"></td>
    </tr>

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

  2. #2
    Addicted Member
    Join Date
    Jan 1999
    Posts
    173

    Post

    OK. What you've done is something like this:

    Response.Write "Sam

    Without including the trailing "
    Look through your code especially at the SQL statements.

    ------------------
    "To the glory of God!"


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