9 Replies Latest reply on Apr 24, 2012 11:10 AM by MTAnnie3356

    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 IsDefined("Form.FirstName") and Form.FirstName NEQ "">

         AND PartyInformation.First Like'#Form.FirstName#%'


              <cfif IsDefined("Form.CaseNo") and Form.CaseNo NEQ "">

         AND CaseInformation.FullCaseNo ='#Form.CaseNo#'


      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!!