Help with Syntax on Webpage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff

    Help with Syntax on Webpage

    I am getting

    Unable to find operator in query string. Query string currently is
    INSERT INTO Results (Name,Email,Com ments,File) VALUES
    ('::Name::',':: Email::','::Com ments::','::Fil e::')


    Here is the ASP Code..From Frontpage.

    <html>

    <head>
    <% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do
    not Edit.
    FP_CharSet = "windows-1252"
    FP_CodePage = 1252 %>
    <meta http-equiv="Content-Type" content="text/html;
    charset=windows-1252">
    <title>New Page 1</title>
    </head>

    <body>

    <!--webbot bot="DatabaseRe gionStart" s-columnnames s-columntypes
    s-dataconnection= "form" b-tableformat="FA LSE" b-menuformat="FAL SE"
    s-menuchoice s-menuvalue b-tableborder="TR UE" b-tableexpand="TR UE"
    b-tableheader="TR UE" b-listlabels="FAL SE" b-listseparator=" FALSE"
    i-listformat="0" b-makeform="FALSE " s-recordsource s-displaycolumns
    s-criteria s-order s-sql="INSERT INTO Results
    (Name,Email,Com ments,File) VALUES
    ('::Name::',':: Email::','::Com ments::','::Fil e::')"
    b-procedure="FALS E" clientside suggestedext="a sp"
    s-defaultfields=" Name=&amp;amp;E mail=&amp;amp;C omments=&amp;am p;File="
    s-norecordsfound= "Your Profile has been accepted." i-maxrecords="256 "
    i-groupsize="0" botid="0" u-dblib="../../_fpclass/fpdblib.inc"
    u-dbrgn1="../../_fpclass/fpdbrgn1.inc"
    u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="BODY" preview="&lt;ta ble
    border=0 width=&quot;100 %&quot;&gt;&lt; tr&gt;&lt;td
    bgcolor=&quot;# FFFF00&quot;&gt ;&lt;font
    color=&quot;#00 0000&quot;&gt;T his is the start of a Database Results
    region. The page must be fetched from a web server with a web browser
    to display correctly; the current web is stored on your local disk or
    network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" startspan
    b-UseDotNET="FALS E" CurrentExt sa-InputTypes b-DataGridFormat= "FALSE"
    b-DGridAlternate= "TRUE" sa-CritTypes b-WasTableFormat= "FALSE"
    --><!--#include file="../../_fpclass/fpdblib.inc"-->
    <% if 0 then %>
    <SCRIPT Language="JavaS cript">
    document.write( "<div style='backgrou nd: yellow; color: black;'>The
    Database Results component on this page is unable to display database
    content. The page must have a filename ending in '.asp', and the web
    must be hosted on a server that supports Active Server Pages.</div>");
    </SCRIPT>
    <% end if %>
    <%
    fp_sQry="INSERT INTO Results (Name,Email,Com ments,File) VALUES
    ('::Name::',':: Email::','::Com ments::','::Fil e::')"
    fp_sDefault="Na me=&Email=&Comm ents=&File="
    fp_sNoRecords=" Your Profile has been accepted."
    fp_sDataConn="f orm"
    fp_iMaxRecords= 256
    fp_iCommandType =1
    fp_iPageSize=0
    fp_fTableFormat =False
    fp_fMenuFormat= False
    fp_sMenuChoice= ""
    fp_sMenuValue=" "
    fp_sColTypes="& "
    fp_iDisplayCols =16
    fp_fCustomQuery =True
    BOTID=0
    fp_iRegion=BOTI D
    %>
    <!--#include file="../../_fpclass/fpdbrgn1.inc"-->
    <!--webbot bot="DatabaseRe gionStart" endspan i-checksum="44694 "
    --><!--webbot bot="DatabaseRe gionEnd" b-tableformat="FA LSE"
    b-menuformat="FAL SE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc"
    i-groupsize="0" clientside tag="BODY" preview="&lt;ta ble border=0
    width=&quot;100 %&quot;&gt;&lt; tr&gt;&lt;td
    bgcolor=&quot;# FFFF00&quot;&gt ;&lt;font
    color=&quot;#00 0000&quot;&gt;T his is the end of a Database Results
    region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" startspan
    --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
    <!--webbot bot="DatabaseRe gionEnd" endspan i-checksum="65064 "
    --></body></html>

  • pietlinden@hotmail.com

    #2
    Re: Help with Syntax on Webpage

    what happens if you do something like
    Response.Write s-sql

    do you have something like an apostrophe inside your text? If so, the
    database engine will interpret that as a delimiter and will screw up
    your insert statement. You probably need to double all the single
    quotes inside your text boxes before writing them to the database.

    and BTW, it would be a huge help if you would cut out all the pieces of
    the code/web page that are irrelevant to the question....

    Comment

    Working...