Syntax Errors in Recordset, Dreamweaver 8

Hi All!
I'm struggling to figure out Dreamweaver's syntax for a Recordset I'm building.  I'm using Dreamweaver 8, ColdFusion 9 to connect with my database, and Windows 7.
I have to start by admitting I copied code from an similar program, and am trying to get it to work for me.
Here's the error I get when I "test" the recordset:
Syntax error. in query expression '1=1
Here's the query:
SELECT LastName, FirstName, MiddleName, Generation, PartyType
FROM [Party Information]
WHERE 1=1
  SELECT FullCaseNo, DocketSheet
  FROM [Case Information]
  WHERE 1=1
  <cfif IsDefined("Form.LastName") and Form.LastName NEQ "">
   AND PartyInformation.Last Like'#Form.LastName#%'
  </cfif>
  <cfif IsDefined("Form.FirstName") and Form.FirstName NEQ "">
   AND PartyInformation.First Like'#Form.FirstName#%'
  </cfif>
        <cfif IsDefined("Form.CaseNo") and Form.CaseNo NEQ "">
   AND CaseInformation.FullCaseNo ='#Form.CaseNo#'
  </cfif>
ORDER BY LastName, FirstName, MiddleName, FullCaseNo
For the sake of just seeing I deleted "WHERE 1=1" just to see if it would run, and I got another syntax error in the FROM clause.  In case this wasn't already obvious I'm brand new to Dreamweaver and just trying to get this thing to work.
Any help is much appreciated, thanks in advance!!

That's sad to hear.
Anyway, if you're continuing to work on this, why dont you try replacing this:
SELECT LastName, FirstName, MiddleName, Generation, PartyType
FROM [Party Information]
WHERE 1=1
with this:
SELECT LastName, FirstName, MiddleName, Generation, PartyType
FROM PartyInformation
WHERE 0=1
WHERE 1=1 is usually a SQL code to prevent injections and to increase performance of the query you're running.
WHERE 0=1 will usually look up all records in the table you're querying into - this is what you're trying to achieve here anyway.
and rename the table on your DB from Party Information to PartyInformation

Similar Messages

  • Syntax error when adding variables in recordset (query)

    MySql,PHP,Dreamweaver,WindowsVista
    Hi I am receiving a syntax error: invalid quantifier ++ $orderNum;s*?> when adding two variables in the recordset (query) dialog box. I get the error when clicking OK.
    Here is what is entered:
    name: fieldname
    type: text
    default: -1
    runtime value: $_GET['Field']
    name: searchvalue
    type:text
    default: -1
    runtime value: $_GET['Search']
    Can anyone help with this?

    That's a completely separate issue. The error message is telling you that you have not defined the testing server correctly in the Site Definition dialog box.
    The Host directory field and URL prefix should both point to the same place, in other words, the root of your website. Host directory is the physical path, while URL prefix is the address you would put in a browser address bar.
    Select Site > Manage Sites. Select the name of the site, and click the Edit button. In the Site Definition dialog box, select the Advanced tab, and then choose Testing server from the Category list on the left.
    Depending on how your remote login works, Host directory should probably be public_html or just /. Use the same value as in the Remote server part of the Site Definition dialog box. The URL prefix should be http://gaylehansen.aisites.com/.

  • CASE WHEN syntax error - Dreamweaver MX

    Hi Gurus,
    I am trying to use the statement in the Recordset creator tool Advanced Mode:
    select PayDay,
    case when getdate() > PayDay
    then 'Out of Time'
    Else 'On Time'
    End
    From tPayment
    But I get the error:
    Microsoft OLE DB Provider for ODBC Drivers erro '80040e14'
    [Microsoft][Driver ODBC Microsoft Access] Syntax error (Operator missing).
    Anyone help me, please!
    Thanks is advance.

    Hi bregent,
    Thank you very much for your response.
    1) Tell us which verison of Access you are using
    - I am using Access 2007
    2) Use the app dev forum for these questions
    - I couldn't find this forum here
    3)  I didn't think Access supported CASE statements outside of VBA.
    - If there insn't, could be any other workable instead this one
    4) I've never seen CASE/WHEN. Can you refer me to documentation that supports this syntax?
    - I use case/when on MSSQL, I need one that works with Dreamweaver in the recorset creator. What can I use to know if:
    Today is greater than PayDay in the tPayment table then It is must tell me that it is Out of Time (case when getdate() > PayDay then 'Out of Time')
    If the PayDay in the tPayment table is greater than today then it must tell me that it is is On Time (Else'On Time' End).
    That is what I am looking for.
    Thanks a lot!

  • Dreamweaver CS6 and Coldfusion 9 - Syntax Errors & Code Coloring

    I recently purchased Dreamweaver CS6. 
    Also, I'm running Coldfusion 9 on Windows 7, but that's probably irrelevant.
    The issue is that Dreamweaver keeps on marking my files with syntax errors, and the code coloring gets all messed up.
    For instance, such function would indicate an error due to the #var#:
    <cfoutput><script>functionXYZ(#var#);<script><cfoutput>
    But this would work just fine:
    <script>functionXYZ(<cfoutput>#var#<cfoutput>);<script>
    The issue is that I have entire pages wrapped in cfoutput, redoing everything would take months.
    Or this would break the code coloring for the entire select as such:
    <select <cfif test eq 'test'>class="test"</cfif> name="selectbox">
    While this breaks the code coloring for the closing cfif as such:
    <select class="<cfif test eq 'test'>test</cfif>" name="selectbox">
    I'm getting syntax errors on thousands of my files, I understand that I could rewrite the code slightly to remove some of the error indications, but these are not actual errors so I feel that there is no point of me spending months updating the code.
    Is there a patch that I can apply so that this would work without any of these issues?
    Can someone please help?

    Have you posted this question in the Cold Fusion Forums?
    http://forums.adobe.com/community/coldfusion
    I don't use CF myself and the few CF coders I know have long since moved to Eclipse/ColdFusion Builder. 
    Nancy O.

  • Syntax error in dreamweaver

    this message keep showing up in my code view in dreamweaver cs4 in one of my files,
    "There is a syntax error on line 24 of MXWidgets.js.php. Code hinting may not work untill you fix this error"
    how do i fix this pls
    also my date field with a date picker does not insert the date in my mysql date column . what is wrong....pls help

    zeeztaz wrote:
    this message keep showing up in my code view in dreamweaver cs4 in one of my files,
    "There is a syntax error on line 24 of MXWidgets.js.php. Code hinting may not work untill you fix this error"
    how do i fix this pls
    Dreamweaver CS4 comes with improved code hinting, but this particular error message you´re getting doesn´t mean the MXWidgets.js.php - functionality is really broken. I don´t know how to "fix" that, but I´ve always ignored this error message.
    Cheers,
    Günter

  • DreamWeaver CS4-CS5 Creates Syntax Errors

    I cannot seem to find any info on this online but my DreamWeaver CS4 and a trial of DreamWeaver CS5 both create PHP and SQL queries that are loaded with syntax errors. I use XAMPP on my computer as I have done for years, and it works fine with phpMyAdmin and Komodo Edit. DreamWeaver has been a nifty app to quickly knock out simple applications in that past, but now I spend too much time manually correcting syntax errors in PHP page queries.
    Has anyone there heard of a fix for this? Several other web developers have told me that they entirely abandoned DW CS* series and moved on to other IDE's rather than try to fix the problem.
    EXAMPLE:
    Here is what it wrote:
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE `mysite` SET about-yn=%s, about-h1=%s, about-p1=%s, about-p2=%s, about-p2-img=%s, about-p3=%s, about-p3-img=%s, about-p4=%s, about-p4-img=%s WHERE siteID=%s",
                           GetSQLValueString($_POST['aboutyn'], "text"),
                           GetSQLValueString($_POST['abouth1'], "text"),
                           GetSQLValueString($_POST['aboutp1'], "text"),
                           GetSQLValueString($_POST['aboutp2'], "text"),
                           GetSQLValueString($_POST['aboutp2img'], "int"),
                           GetSQLValueString($_POST['aboutp3'], "text"),
                           GetSQLValueString($_POST['aboutp3img'], "int"),
                           GetSQLValueString($_POST['aboutp4'], "text"),
                           GetSQLValueString($_POST['aboutp4img'], "int"),
                           GetSQLValueString($_POST['siteID'], "int"));
    Here is what it should have written:
    f ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
       $updateSQL = sprintf("UPDATE `mysite` SET  `about-yn`=\"%s\", `about-h1`=\"%s\", `about-p1`=\"%s\", `about-p2`=\"%s\", `about-p2-img`=\"%s\",  `about-p3`=\"%s\", `about-p3-img`=\"%s\", `about-p4`=\"%s\", `about-p4-img`=\"%s\" WHERE  `siteID`=\"%s\"",
                            GetSQLValueString($_POST['aboutyn'], "text"),
                            GetSQLValueString($_POST['abouth1'], "text"),
                            GetSQLValueString($_POST['aboutp1'], "text"),
                            GetSQLValueString($_POST['aboutp2'], "text"),
                            GetSQLValueString($_POST['aboutp2img'], "int"),
                            GetSQLValueString($_POST['aboutp3'], "text"),
                            GetSQLValueString($_POST['aboutp3img'], "int"),
                            GetSQLValueString($_POST['aboutp4'], "text"),
                            GetSQLValueString($_POST['aboutp4img'], "int"),
                            GetSQLValueString($_POST['siteID'], "int"));
    [email protected]

    Dreamweaver will not produce such a mess when using column names which comply with the MySQL Naming Conventions and don´t contain (often quite problematic) hyphen characters.
    That said, you´ll be on the safe side when renaming your columns by using underscores instead, example:
    about_p3_img
    Several other web developers have told me that they entirely abandoned DW CS* series and moved on to other IDE's rather than try to fix the problem.
    Dreamweaver is certainly not a "perfect" PHP development IDE, but other IDEs (I use Komodo or Aptana at times and like them a lot...) aren´t perfect either. This may seem strange, but IMO Dreamweaver did do the - sort of - right thing by not letting the user get away with using such problematic characters, and that´s what those other IDEs I work with regretfully don´t pay attention to.

  • Dreamweaver claiming non-existent php syntax errors temporarily

    Dreamweaver occasionally tells me I have php errors that do not exist. In order to get dreamweaver to recognize the error, I have to save the document and then go to another document, and then go back to my current document, and then dreamweaver will recognize that there are no syntax errors. It's very annoying, because it frequently results in my tearing out my hair looking for an error that does not exist. Is there anyway to force dreamweaver to check for syntax errors more frequently, or some other workaround?

    You are not giving away any of your secrets, so I shall tell you mine:
    Windows7, DWCS5.5, Testing server setup for PHP MySQL
    The above allows me to create new documents that automatically have the PHP extension assigned to the. As soon as I type <?php I get an error message until I have also entered ?>
    Gramps

  • TNG_recordset  Syntax error in query.  Incomplete query clause.

    I'm using the ADDT insert record form wizard and I keep getting this error: Syntax error in query. Incomplete query clause. Can anyone help?
    <br />
    <br /><%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <br />
    <!--#include file="../Connections/rentalpaypro.asp" -->
    <br />
    <!--#include file="../includes/common/KT_common.asp" -->
    <br />
    <!--#include file="../includes/tNG/tNG.inc.asp" -->
    <br /><%<br />'Start log out user<br />  Set logout = new tNG_Logout<br />  logout.setLogoutType "link"<br />  logout.setPageRedirect "../index.html"<br />  logout.Execute<br />'End log out user<br />%>
    <br /><%<br />'Make a transaction dispatcher instance<br />Dim tNGs: Set tNGs = new tNG_dispatcher<br />tNGs.Init "../"<br />%>
    <br /><%<br />' Start trigger<br />Dim formValidation: Set formValidation = new tNG_FormValidation<br />formValidation.Init<br />formValidation.addField "ContactFirstName", true, "text", "", "", "", ""<br />formValidation.addField "ContactLastName", true, "text", "", "", "", ""<br />formValidation.addField "EmailAddress", true, "text", "email", "", "", ""<br />formValidation.addField "BillingAddress", true, "text", "", "", "", ""<br />formValidation.addField "City", true, "text", "", "", "", ""<br />formValidation.addField "StateOrProvince", true, "text", "", "", "", ""<br />formValidation.addField "ZipCode", true, "numeric", "", "", "", ""<br />formValidation.addField "PhoneNumber", true, "text", "", "", "", ""<br />tNGs.prepareValidation formValidation<br />' End trigger<br />%>
    <br /><%<br />'Start Restrict Access to Page<br />  Dim restrict: Set restrict  = new tNG_RestrictAccess<br />  restrict.Init MM_rentalpaypro_STRING, "../"<br />'Grand Levels: Any<br />  restrict.Execute<br />'End Restrict Access to Page<br />%>
    <br /><%<br />' Make an insert transaction instance <br />Dim ins__Landlord_Contact_Info_: Set ins__Landlord_Contact_Info_ = new tNG_insert<br />ins__Landlord_Contact_Info_.init MM_rentalpaypro_STRING<br />tNGs.addTransaction ins__Landlord_Contact_Info_<br />' Register triggers<br />ins__Landlord_Contact_Info_.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1")<br />ins__Landlord_Contact_Info_.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)<br />ins__Landlord_Contact_Info_.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "index.asp")<br />' Add columns<br />ins__Landlord_Contact_Info_.setTable ""Landlord_Contact Info""<br />ins__Landlord_Contact_Info_.addColumn "ContactFirstName", "STRING_TYPE", "POST", "ContactFirstName", ""<br />ins__Landlord_Contact_Info_.addColumn "ContactLastName", "STRING_TYPE", "POST", "ContactLastName", ""<br />ins__Landlord_Contact_Info_.addColumn "EmailAddress", "STRING_TYPE", "POST", "EmailAddress", ""<br />ins__Landlord_Contact_Info_.addColumn "BillingAddress", "STRING_TYPE", "POST", "BillingAddress", ""<br />ins__Landlord_Contact_Info_.addColumn "City", "STRING_TYPE", "POST", "City", ""<br />ins__Landlord_Contact_Info_.addColumn "CompanyName", "STRING_TYPE", "POST", "CompanyName", ""<br />ins__Landlord_Contact_Info_.addColumn "StateOrProvince", "STRING_TYPE", "POST", "StateOrProvince", ""<br />ins__Landlord_Contact_Info_.addColumn "ZipCode", "NUMERIC_TYPE", "POST", "ZipCode", ""<br />ins__Landlord_Contact_Info_.addColumn "Extension", "STRING_TYPE", "POST", "Extension", ""<br />ins__Landlord_Contact_Info_.addColumn "FaxNumber", "STRING_TYPE", "POST", "FaxNumber", ""<br />ins__Landlord_Contact_Info_.addColumn "PhoneNumber", "STRING_TYPE", "POST", "PhoneNumber", ""<br />ins__Landlord_Contact_Info_.setPrimaryKey "ContactInfoID", "NUMERIC_TYPE", "", ""<br />%>
    <br /><%<br />'Execute all the registered transactions<br />tNGs.executeTransactions<br />%>
    <br /><%<br />'Get the transaction recordset<br />Dim rs_Landlord_Contact_Info_<br />Dim rs_Landlord_Contact_Info__numRows<br /><br />Set rs_Landlord_Contact_Info_ = tNGs.getRecordset(""Landlord_Contact Info"")<br />rs_Landlord_Contact_Info__numRows = 0<br />%>

    Are you sure that you are passing the querystring customerid
    when the form
    company_cus is empty.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "aonefun" <[email protected]> wrote in
    message
    news:epmf3n$f3u$[email protected]..
    >I am receiving the following error message:
    >
    > Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator)
    > in
    > query expression 'customerid_cus='.
    >
    > for the following code:
    >
    > If IsEmpty(Request.Form("company_cus")) Then
    >
    > rs_company.Source = "SELECT customerid_cus, company_cus
    FROM
    > customers_cus
    > WHERE customerid_cus= "&
    Request.QueryString("customerid") &" "
    >
    > Else
    >
    > rs_company.Source = "SELECT customerid_cus, company_cus
    FROM
    > customers_cus
    > WHERE company_cus = '"& Request.Form("company_cus")
    >
    > End If
    >
    > What could the problem be?
    >

  • Why am I getting a syntax error on the /head line in DW CC?

    I am getting a syntax error in DW CC.  Other threads have indicated this was a bug in CS6 but had been fixed in CC.  That leads me to believe it's my fault, but I can't figure it out.  Can anyone help based on the information I've pasted below?  Thanks!
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Untitled Document</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="style.css" rel="stylesheet" type="text/css">
    <link href="jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">
    <link href="jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">
    <link href="jQueryAssets/jquery.ui.accordion.min.css" rel="stylesheet" type="text/css">
    <link href="jQueryAssets/jquery.ui.tabs.min.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="respond.min.js"></script>
    <script src="jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="jQueryAssets/jquery-ui-1.9.2.accordion.custom.min.js" type="text/javascript"></script>
    <script src="jQueryAssets/jquery-ui-1.9.2.tabs.custom.min.js" type="text/javascript"></script>
    <!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.--><script>var __adobewebfontsappname__="dreamweaver"</script><script src="http://use.edgefonts.net/adamina:n4:default.js" type="text/javascript"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="div1" class="fluid">
        <header id="header" class="fluid">
          <p><img src="Images/Logos/insidejoplinlogo.png"  alt=""/></p>
            <nav id="mainnav" class="fluid"> <ul class="fluid fluidList mainnavlist"> <li class="fluid mainnavitem zeroMargin_desktop"><a href="Index2.html" title="Inside Joplin Home" target="_self">Home</a></li><li class="fluid mainnavitem"><a href="news.html">News</a></li><li class="fluid mainnavitem"><a href="entertainment.html">Entertainment</a></li><li class="fluid mainnavitem"><a href="announcements.html">Announcements</a></li><li class="fluid mainnavitem hide_mobile"><a href="galleries.html">Galleries</a></li><li class="fluid mainnavitem hide_mobile"><a href="aboutcontact.html">About/Contact</a></li>  </ul> </nav>
        </header>
        <article id="indexguts" class="fluid">    <article id="indexarticle" class="fluid">
          <h4 class="fluid articleH4 zeroMargin_mobile">Latest News</h4>
          <p> </p>
         <div id="Accordion1">
            <h3><a href="#">Section 1</a></h3>
            <div>
              <p>Content 1</p>
              </div>
            <h3><a href="#">Section 2</a></h3>
            <div>
              <p>Content 2</p>
              </div>
            <h3><a href="#">Section 3</a></h3>
            <div>
              <p>Content 3</p>
              </div>
          </div>
        </article><article id="article1" class="fluid">
          <h4 class="fluid articleH4 zeroMargin_mobile">Latest Entertainment</h4>
          <p> </p>
          <div id="Accordion2">
            <h3><a href="#">Section 1</a></h3>
            <div>
              <p>Content 1</p>
              </div>
            <h3><a href="#">Section 2</a></h3>
            <div>
              <p>Content 2</p>
              </div>
            <h3><a href="#">Section 3</a></h3>
            <div>
              <p>Content 3</p>
              </div>
          </div>
        </article><article id="article2" class="fluid"><h4 class="fluid articleH4 zeroMargin_mobile">Latest Announcements</h4>
        <p> </p>
          <div id="Tabs1">
            <ul>
              <li><a href="#tabs-1">Obituaries</a></li>
              <li><a href="#tabs-2">Weddings</a></li>
              <li><a href="#tabs-3">More</a></li>
              </ul>
            <div id="tabs-1">
              <p>Content 1</p>
              </div>
            <div id="tabs-2">
              <p>Content 2</p>
              </div>
            <div id="tabs-3">
              <p>Content 3</p>
              </div>
        </div>
        </article><article id="indexbotleft" class="fluid">This is the content for Layout Article Tag "indexbotleft"</article><article id="article3" class="fluid">This is the content for Layout Article Tag "indexbotleft"</article></article><aside id="mainsidebar" class="fluid">This is the content for Layout Aside Tag "mainsidebar"</aside><aside id="mainsidebar2" class="fluid">This is the content for Layout Aside Tag "mainsidebar2"</aside><article id="indexbotrot" class="fluid">This is the content for Layout Article Tag "indexbotrot"</article>
        <footer id="footer" class="fluid">
        <nav id="footernav" class="fluid">
         <ul id="footernavlist" class="fluid fluidList"> <li class="fluid footernavlistitem zeroMargin_mobile"><a href="Index2.html">Home</a></li><li class="fluid footernavlistitem hide_mobile"><a href="news.html">News</a></li>
          <li class="fluid footernavlistitem hide_mobile"><a href="entertainment.html">Entertainment</a></li>
          <li class="fluid footernavlistitem hide_mobile"><a href="announcements.html">Announcements</a></li>
           <li class="fluid footernavlistitem zeroMargin_desktop zeroMargin_mobile"><a href="galleries.html">Galleries</a></li>
           <li class="fluid footernavlistitem zeroMargin_mobile"><a href="aboutcontact.html">About Us</a></li> 
            <li class="fluid footernavlistitem zeroMargin_mobile"><a href="mailto:[email protected]">Email</a></li> <li class="fluid footernavlistitem zeroMargin_mobile"><a href="www.facebook.com/insidejoplin" target="new">Facebook</a></li></ul> 
           </nav>
           <article id="footerarticle" class="fluid"><img src="Images/Logos/insidejoplinlogo.png"  alt=""/></article>
        </footer>
      </div>
    </div>
    +
    <script type="text/javascript">
    $(function() {
              $( "#Accordion1" ).accordion();
    $(function() {
              $( "#Accordion2" ).accordion();
    $(function() {
              $( "#Tabs1" ).tabs();
    </script>
    </body>
    </html>

    Well Jon, the code is very simple... it's generated by DW's form check... and, as i said, it happens with unfailing regularity the minute it's put in to a template generated child.
    This is what the code on the page looks like:
    <head>
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Title Here</title>
    <meta name="Keywords" content="some keywords here" />
    <meta name="Description" content="Description here" />
    <script type="text/javascript">
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');
    </script>
    <!-- InstanceEndEditable -->
    </head>
    And, whammo: "There is a syntax error on line xx. Code hinting may not work until you fix this error."
    And, the error always highlights the closing </script> line.
    The script itself is fine:
    1. If one puts it into an external js file, there's no problem
    2. If one puts it in the body section, there's no problem
    3. If one puts it in the template, there's no problem
    Also, if one removes the closing </script> tag, the error goes away
    The problem only happens in a child generated by a template and in the location I've illustrated. Apparently, this is a problem a lot of users are facing...

  • Syntax Error in Update Statement

    Would a smart and kind CF pro mind putting a fresh pair of
    eyes on this code and tell me where the syntax error is? All the
    fields in the statement are numeric except the last one (comments).
    I have enclosed them in val() to ensure they are numeric when
    inserted into the DB. The fields they're being inserted into are
    numeric. I need to be numeric because I will be doing calculations
    on them. Also, I have triple-checked to ensure the datasource,
    table, and field names all match.
    Thanks,
    GwenH

    Try using <cfqueryparam>
    <cfquery datasource="reviews">
    UPDATE evals
    SET focus = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.focus#">
    , strengths = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.strengths#">
    , tailored = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.tailored#">
    , badinfo = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.badinfo#">
    , format = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.format#">
    , visual = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.visual#">
    , grammar = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.grammar#">
    , pronouns = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.pronouns#">
    , written = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.written#">
    , achieve = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.achieve#">
    , sell = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.sell#">
    , negative = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.negative#">
    , top = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.top#">
    , general = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.general#">
    , intro = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.intro#">
    , orientation = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.orientation#">
    , paragraphs = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.paragraphs#">
    , two = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.two#">
    , length = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.length#">
    , none = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.none#">
    , comments = <cfqueryparam cfsqltype="cf_sql_clob"
    value="#form.comments#">
    WHERE resumeID = <cfqueryparam cfsqltype="cf_sql_numeric"
    value="#form.resumeID#">
    </cfquery>
    Ken Ford
    Adobe Community Expert Dreamweaver/ColdFusion
    Adobe Certified Expert - Dreamweaver CS3
    Adobe Certified Expert - ColdFusion 8
    Fordwebs, LLC
    http://www.fordwebs.com
    "GwenH" <[email protected]> wrote in message
    news:[email protected]...
    > Would a smart and kind CF pro mind putting a fresh pair
    of eyes on this
    > code
    > and tell me where the syntax error is? All the fields in
    the statement are
    > numeric except the last one (comments). I have enclosed
    them in val() to
    > ensure
    > they are numeric when inserted into the DB. The fields
    they're being
    > inserted
    > into are numeric. I need to be numeric because I will be
    doing
    > calculations on
    > them. Also, I have triple-checked to ensure the
    datasource, table, and
    > field
    > names all match.
    >
    > Thanks,
    > GwenH
    >
    > <cfquery datasource="reviews">
    > UPDATE evals
    > SET
    > focus = val(#form.focus#)
    > , strengths = val(#form.strengths#)
    > , tailored = val(#form.tailored#)
    > , badinfo = val(#form.badinfo#)
    > , format = val(#form.format#)
    > , visual = val(#form.visual#)
    > , grammar = val(#form.grammar#)
    > , pronouns = val(#form.pronouns#)
    > , written = val(#form.written#)
    > , achieve = val(#form.achieve#)
    > , sell = val(#form.sell#)
    > , negative = val(#form.negative#)
    > , top = val(#form.top#)
    > , general = val(#form.general#)
    > , intro = val(#form.intro#)
    > , orientation = val(#form.orientation#)
    > , paragraphs = val(#form.paragraphs#)
    > , two = val(#form.two#)
    > , length = val(#form.length#)
    > , none = val(#form.none#)
    > , comments = '#form.comments#'
    > WHERE resumeID = #form.resumeID#
    > </cfquery>
    >

  • "There is a syntax error on line .. Code hinting may not work untill you fix this error"

    Hi guys, i hope your are all well and happy.
    i have syntax error on new pages created from template  (no errors in template) I use Dreamweave CS5
    Thiis is part of my code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>| Building and Construction services | Maintenance services | Cleaning services | Buildant Ltd |</title>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <link href="file:///D|/Local Sites/Buildant/CSS/buildant.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    </head>
    I have highlited line with red (the dreamweaver telling me that syntax error is on this line)
    Could anybody please help mw with this one
    Thank you

    I copy and pasted your code and got the error. I rewrote the code and it went away. I have had problems in DW with templates that gave me errors when everything was good but the only way to fix it was to redo the template from scratch. Sounds stange, but true. The only other thing, and the experts here might chime in is to put the scripts in comment tags like below.
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>| Building and Construction services | Maintenance services | Cleaning services | Buildant Ltd |</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <link href="file:///D|/Local Sites/Buildant/CSS/buildant.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    I don't get the error now, so I am unsure what to do.
    Jim

  • Code syntax error in header using a template?

    Now running CS5 DW in a 32 bit Windows/Vista ultimate environment. The improved error messages have brought to light a problem that I apparently have had for a long time but didn't know it as CS4 simply flagged the line but no message.
    Many of my site pages use a template http://a0540807.uscgaux.info/Templates/A0540807_Skeleton_2010.dwt
    If I build or edit a page using this template in CS5, when in code view I see "There is a syntax error on line 57. Code hinting may not work until you fix this error.  Line 57 is within the header of the page and is simply </script>
    But if I simply detach the template from the page, the error goes away and it says no syntax errors.
    So I am confused, is there an issue with the code or is this a Dreamweaver issue dealing with template usage?
    While the error appears cosmetic, I keep wondering what to do to eliminate. Apparently, I have had this situation a long time as Line 57 is also identified back in CS4 but no error message until CS5. Any pointers are appreciated. Thanks.
    Andy

    I don't actually think there is any problem with your page...run one of your child pages through the W3C validator: http://validator.w3.org/ . I cast a page from your template and it came through with flying colors!
    Beth

  • How to fix a Syntax Error?

    I have a problem with my MXML Application. I keep getting an error: 1084: Syntax error: expecting rightparen before rightbrace, But I don't know what that means. Here's my MXML,
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
        backgroundColor="#FFFFFF"
        backgroundAlpha="0" width="1050" height="1000">
        <mx:Text width="964" height="497" enabled="true" fontSize="15">
            <mx:text>For right now, Changer098.com is still under construction and is progressing. However the change from Adobe Dreamweaver to Adobe Flex has left Changer098.com with new difficulties. Such as; the longing bearing task for loading the page as you have experienced. Also, Flex requires Adobe Flash, AIR, and Shochwave to work correctly. So if you are viewing this site and do not have these plugins enabled, please enable them for designated viewing pleasure.</mx:text>
        </mx:Text>
        <mx:TextInput x="127" y="505" maxChars="30" editable="true" enabled="true"/>
        <mx:Label x="0" y="507" text="Your Email Addresse" enabled="true"/>
        <mx:TextInput x="127" y="535" editable="true" enabled="true" maxChars="30"/>
        <mx:Label x="0" y="537" text="Your Username" width="119"/>
        <mx:TextInput x="0" y="565" editable="true" enabled="true" maxChars="500" width="287" height="140"/>
        <mx:CheckBox x="0" y="713" label="By clicking this you agree to the terms and conditions" selected="false" enabled="true"/>
        <mx:Button x="10" y="743" label="Terms And Conditions">
            <mx:click>navigateToURL(new URLRequest('http://changer098.webs.com/tac.html'), '_blank')</mx:click>
        </mx:Button>
        <mx:Button x="0" y="773" label="Send" id="send">
            <mx:click>(navigateToURL(new URLRequest('mailto:[email protected]') , navigateToURL(new URLRequest('http://changer098.webs.com/sent.html'), '_blank')</mx:click>
        </mx:Button>
        <mx:Label x="0" y="803" text="Do Not Send Unless You Agree To Terms And Conditions" fontSize="15" textDecoration="underline" fontWeight="bold"/>
    </mx:Application>
    It says there is an error at line: 18. Can anyone help me?

    the clickhandler function is an Actionscript function. Its not mxml.
    You have to wrap it inside a mx:Script.
    for example
    <mx:Script>
    <![CDATA[
         private function clickHandler():void
         navigateToURL(new URLRequest('mailto:[email protected]'));
         navigateToURL(new URLRequest('http://changer098.webs.com/sent.html'), '_blank')
    ]]>
    </mx:Script>
    In general, whenever you want to write Actionscript in your project you use the mx:Script tag.

  • [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error

    Hi , i am trying to execute siple SP using JDBC-ODBC Bridge Driver
    Here my code :
    String dsn="Tritek1";
    String user="sa";
    String password="imcindia";
    Connection con1 = null;
    CallableStatement cstmt = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    con1=DriverManager.getConnection("jdbc:odbc:"+dsn,user,password);
    Statement st=con1.createStatement();
    st.execute("use dm0102d");
    st.execute("setuser 'dm01012'");
    cstmt = conObject.connection(" ?=Call dms_ex_get_folder_info(?,?,?)");
    cstmt.setString(1,folderType);
    cstmt.registerOutParameter(2,java.sql.Types.VARCHAR);
    cstmt.registerOutParameter(3,java.sql.Types.VARCHAR);     bFlag=cstmt.execute();
    Here my SP :
         Procedure Name          :     dms_ex_get_folder_info
         Input Parameter(s)          :     a. folder_type char(20)
         Return Parameter(s)     :     a. Recordset consist edit_mask and folder_type_code from folder_reference table / error
         Procedure Type          :     select
         Programmer          :     Prashanth Kumar M.
         Creation Date          :     12/20/2005 (20th Dec, 2005)
         Tables Accessed          :     folder_reference
         Revised               :
              Programmer:     Date:     Description:
              Prashanth Kumar M.      12/21/2005 Modified the script as per the approved program specifications.
         Test Query:
              Declare @edit_mask char(15)
              Declare @folder_type_code char(2)
              execute dms_ex_get_folder_info 'Policy Folder',@edit_mask output,@folder_type_code output
              Print 'Edit Mask : ' + @edit_mask
              Print 'Folder Type Code : ' + @folder_type_code
    CREATE PROCEDURE dms_ex_get_folder_info
         @folder_type char(20),
         @edit_mask char(15) output,
         @folder_type_code char(2) output
    AS
         BEGIN
              -- Check if the record for @folder_type exists or not.
              BEGIN
                   -- return the record from folder_reference
                   SELECT
                        @edit_mask= IsNull(edit_mask,''),
                        @folder_type_code = IsNull(folder_type_code,'')
                   FROM      folder_reference
                   WHERE
                        folder_decode = ltrim(rtrim(@folder_type))
                   -- return the error message
                   IF @@error <> 0
                        BEGIN
                             RAISERROR 100016 'Error in gettting the record from folder_reference table'
                             RETURN (@@error)
                        END
                   IF @edit_mask = '' AND @folder_type_code = ''
                        BEGIN
                             RAISERROR 100017 'No matching details in the folder_reference table'
                        RETURN (@@error)
                        END
              END
         END
    GO
    Here My Exception:
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
         at com.nyl.dms.bl.Folder.createFolder(Folder.java:121)
         at com.nyl.dms.bl.Folder.main(Folder.java:223)
    Any one can help me to overcome this problem . Thanks in advance.
    venkat

    Here's from one of those 10s of books.
    Quoted from JDBC 3.0 by Bernard Van Haecke:
    Stored procedures can return multiple result types because they can be composed of SQL statements that return diverse result types: resultsets and update counts (this includes special error codes).
    Now this doesn't sound very satisfactory. So I use Sybase since I don't have any other database at the moment, and write a simple stored procedure.
    CREATE proc testproc AS
    BEGIN
    -- My return code
    return 7
    END
    goThen a sample patchy buggy code to play around:
    import java.sql.*;
    public class ProcTesting {
        public static void main(String[] args) {
            String connUrl          = "jdbc:sybase:Tds:myserver:5150/dbinst";
            String userName         = "username";
            String password         = "password";
            Connection con          = null;
            CallableStatement stmt  = null;
            ResultSet rs            = null;
            String sql = "{? = call testproc}";
            try {
                Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                con     = DriverManager.getConnection(connUrl, userName, password);
                stmt    = con.prepareCall(sql);
                stmt.registerOutParameter(1, Types.INTEGER);
                stmt.execute();
                System.out.println(stmt.getInt(1));
            } catch(Exception e) {
                e.printStackTrace();
            } finally {
                closeAll(con, stmt);
        public static void closeAll(Connection con, Statement stmt) {
            try {
                con.close();
            } catch(Exception e) {  }
            try {
                stmt.close();
            } catch(Exception e) {  }
    }Followed by:
    javac ProcTesting.java
    java -cp "%CLASSPATH%;C:\jarutils\jconn2.jar" ProcTesting
    Output:
    7
    Didn't you know this could be done?
    Happy new year, grandpa!

  • Syntax error fix needed for "...getHelperForLanguage: function(language) null,..."

    Getting the syntax error, and having limited technical experience, I do not know how to fix the problem. This is in regard to a web site asset, an mp3 file. I am having problems getting such files to play within Chrome (though they play in Internet Explorer, for instance), so I am trying to troubleshoot from within Dreamweaver, as well as from the Chrome extensions side.
    Here is the line including the syntax error, with additional lines
        getInterfaces: function(countRef) {
            var interfaces = [Ci.nsIDOMGeoPositionCoords, Ci.nsIClassInfo, Ci.nsISupports];
            countRef.value = interfaces.length;
            return interfaces;
    getHelperForLanguage: function(language) null,
        contractID: "",
    Thanks for help.

    Use HTML5 <audio>. 
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Audio Demo</title>
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    </head>
    <body>
    <audio controls>
    <source src="path/yourSong.ogg" type="audio/ogg">
    <source src="path/yourSong.mp3" type="audio/mp3">
    <p>Ooooops.  Looks like your browser is out of date and doesn't support the audio tag.  Please upgrade to a modern browser.</p>
    </audio>
    </body>
    </html>
    Nancy O.

Maybe you are looking for

  • Adobe bridge appears as a question mark on iMac dock and will not open, why?

    Adobe bridge appears as a question mark on iMac dock and will not open, why?

  • PDF Printing with BI Publisher makes empty document

    Hi all, We have installed the BI Publisher. And configured apex to use it as printer server. In Apex we created a report query. The query I exported to an xml file. And I also exported the xml schema. These two files I imported in Word with the BI Pu

  • Clean install iBook G4 with Tiger

    I need to clean up my harddrive. I have backed up all of my files, so I think I want to do a clean re-install of the OS. I'm wondering the best way to go about doing this. Any tips? Is there a way to do it without uninstalling various software (Micro

  • Print A4 size report in A5 page

    i design a report with A4 size, in basic it print to an A4 size, but i could export it to pdf file and open printer settings and select A5 then it print A4 report in A5 page ( printer scale it automatically). and now my question: how can i change set

  • Trying to Connect Wireless Printer

    Seems like a silly question to me...but I can't for the life of me figure out how to do this. I just bought a Lexmark X6570 Wireless Printer, in hopes that it would wirelessly connect to my Airport Extreme. However, the only printer configurations I