4 Replies Latest reply on Apr 21, 2007 6:55 AM by Newsgroup_User

    Help Days of Error causing sleeplessness

      ok so i seem to continually get an error when trying to make my drop down box options have a value that would go into the sql statement to decide which gallery to display. i am going to copy and paste my code below and the error. please help me as much as possible. also remember i am a newbie to coldfusion and the syntax to it.


      <cfset Gallery_type1="Profiles.type='model' and 'dancer'">
      <cfset Gallery_type2="Profiles.type='model'">
      <cfset Gallery_type3="Profiles.type='model'">

      <title>Untitled Document</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

      <cfform method="post" name="Gallery" id="Gallery" action="gallery.cfm">
      <cfselect name="Gallery" id="Gallery" title="Gallery_Options">
      <option id="Gallery_type1" value='variable.Gallery_type1' selected>All</option>
      <option id="Gallery_type2" value='variable.Gallery_type2'>Models</option>
      <option id="Gallery_type3" value='variable.Gallery_type3'>Dancers</option>
      <cfinput type="submit" name="Submit" value="Go">

      Page: Gallery.cfm

      <cfset Gallery_type1="Profiles.type='model' and profiles.type='dancer'">
      <cfset Gallery_type2="Profiles.type='model'">
      <cfset Gallery_type3="Profiles.type='model'">

      <cfquery name="All_Profiles" datasource="All_Access" dbtype="dynamic">
      SELECT Profiles.Last_Name, Profiles.Type, Profiles.Picture, Profiles.First_Name
      FROM Profiles
      WHERE <cfoutput>#form.Gallery#</cfoutput>
      ORDER BY Profiles.Last_Name

      <title>Untitled Document</title>


      <p> </p>
      <table border="0" cellpadding="1" cellspacing="1" align="center">
      <cfoutput query="Profiles">
      <cfif profiles.currentrow mod 3 eq 1>
      <img src="Images/#Profiles.picture1#" width="200" height="200"><br>
      <cfif profiles.currentrow mod 3 eq 0>

      Error Message (when clicking submit button):

      The web site you are accessing has experienced an unexpected error.
      Please contact the website administrator.

      The following information is meant for the website developer for debugging purposes.

      Error Occurred While Processing Request
      Error Executing Database Query.
      No value given for one or more required parameters.

      Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debugging Settings, and select the Robust Exception Information option.
      Check the ColdFusion documentation to verify that you are using the correct syntax.
      Search the Knowledge Base to find a solution to your problem.

      Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
      Remote Address
      Referrer http://localhost:8500/cfide/all_access/TMP71jbrgu1if.cfm
      Date/Time 20-Apr-07 11:20 PM

      any help would greatly be appreciated.