<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1024827" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1024827</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151763</link>
    <description> &lt;p&gt;I have finished the data entry form and it works.  One of the major problems that I was having was that I had set the table fields to not allow zero length.  I corrected this because not all fields will be filled in for each movie.  Also at another forum someone suggested this for my values:&lt;br /&gt;
VALUES(&lt;br /&gt;
     &#039;#Form.MovieTitle#&#039;,&lt;br /&gt;
     &#039;#Form.director#&#039;,&lt;br /&gt;
     &#039;#Form.mainActors#&#039;,&lt;br /&gt;
     &#039;#Form.studioHouse#&#039;,&lt;br /&gt;
     &#039;#Form.genre#&#039;,&lt;br /&gt;
     &#039;#Form.description#&#039;,&lt;br /&gt;
     #Form.runningMinutes#,&lt;br /&gt;
     &#039;#Form.parentalRating#&#039;,&lt;br /&gt;
     #Val(seriesFlag)#,&lt;br /&gt;
     &#039;#Form.seriesName#&#039;,&lt;br /&gt;
     #Val(copyFlag)#,&lt;br /&gt;
     #Val(mdlFlag)#,&lt;br /&gt;
     #Val(gclFlag)#,&lt;br /&gt;
     #Val(onloanFlag)#,&lt;br /&gt;
     #CreateODBCDate(Form.onLoanDate)#NULL,&lt;br /&gt;
     &#039;#Form.onLoanName#&#039;,&lt;br /&gt;
     &#039;#Form.requestorName#&#039;&lt;br /&gt;
     )&lt;br /&gt;
This really worked well.  I want to thank the people that helped me with this part of my project.  I am now moving on to building an update form for the DVDs.&lt;/p&gt;
 </description>
     <pubDate>Thu, 20 May 2004 14:01:04 +0000</pubDate>
 <dc:creator>cgacfox</dc:creator>
 <guid isPermaLink="false">comment 1151763 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151681</link>
    <description> &lt;p&gt;I received my book that I bought on ColdFusion today but I can&#039;t really find anything that points to what my error is.  I originally saved the input form page as an HTML page but changed it to a CFM page.  That didn&#039;t help anything.  I still get the same error.  Should I post the code from the data entry form page as well?&lt;/p&gt;
 </description>
     <pubDate>Wed, 19 May 2004 01:42:45 +0000</pubDate>
 <dc:creator>cgacfox</dc:creator>
 <guid isPermaLink="false">comment 1151681 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151599</link>
    <description> &lt;p&gt;I removed the single quotes around onloandate and runningminutes.  This still didn&#039;t work.  Here is the code from the ADDDVD.cfm page.  This is the page that the DVDs.html page sends info to.&lt;/p&gt;
&lt;p&gt;INSERT INTO DVDS&lt;br /&gt;
(MovieTitle, director, mainactors, studiohouse, Genre, description,&lt;br /&gt;
runningminutes, ParentalRating, seriesflag, seriesname, copyflag, mdlflag, gclflag, onloanflag,&lt;br /&gt;
onloandate, onloanname, requestorname)&lt;br /&gt;
VALUES&lt;br /&gt;
(&#039;#Form.MovieTitle#&#039;,&#039;#Form.director#&#039;,&#039;#Form.mainactors#&#039; &#039;#Form.studiohouse#&#039;,&lt;br /&gt;
&#039;#Form.genre#&#039;, &#039;#Form.description#&#039;,#Form.runningminutes#,&lt;br /&gt;
 &#039;#Form.parentalrating#&#039;, #seriesflag#, &#039;#Form.seriesname#&#039;, #copyflag#, #mdlflag#,&lt;br /&gt;
#gclflag#, #onloanflag#, #Form.onloandate#, &#039;#Form.onloanname#&#039;,&lt;br /&gt;
&#039;#Form.requestorname#&#039;)&lt;/p&gt;
&lt;p&gt;Add DVD Input&lt;/p&gt;
&lt;p&gt;This is turning out to be more tricky that I thought it would.  Thanks.&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 May 2004 21:46:09 +0000</pubDate>
 <dc:creator>cgacfox</dc:creator>
 <guid isPermaLink="false">comment 1151599 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151598</link>
    <description> &lt;p&gt;Try getting rid of the single quotes around any queery value that deals with dates i.e. #Form.onloandate#&lt;/p&gt;
&lt;p&gt;If this doesn&#039;t work, post your full query page with the cfparam tags and I&#039;ll have a look.&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 May 2004 21:06:46 +0000</pubDate>
 <dc:creator>openmind</dc:creator>
 <guid isPermaLink="false">comment 1151598 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151596</link>
    <description> &lt;p&gt;I placed the CFPARAM code on the ADDDVD.cfm page above the query to add the data.  I also added the code to cover the other checkboxes that could be blank.  I tested and here is the new error that I am getting:&lt;/p&gt;
&lt;p&gt;Error Occurred While Processing Request&lt;br /&gt;
Error Executing Database Query.&lt;br /&gt;
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression &#039;&#039;Bill Paxton, Tava Smiley, James Cameron, Lewis Abernathy, Lori Johnston, Don Lynch, Ken Marschall, Charles Pellegrino &#039; &#039;Disney&#039;&#039;.  &lt;/p&gt;
&lt;p&gt;The error occurred in AddDVD.cfm: line 24&lt;/p&gt;
&lt;p&gt;22 : #seriesflag#, &#039;#Form.seriesname#&#039;, #copyflag#, #mdlflag#,&lt;br /&gt;
23 : #gclflag#, #onloanflag#, &#039;#Form.onloandate#&#039;, &#039;#Form.onloanname#&#039;,&lt;br /&gt;
24 : &#039;#Form.requestorname#&#039;)&lt;br /&gt;
25 :&lt;br /&gt;
26 : &lt;/p&gt;
&lt;p&gt;I don&#039;t understand this error.  It is pointing to line 24 but the above statement says that there is a syntax error and I am missing an operator.  I&#039;m confused!&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 May 2004 19:25:05 +0000</pubDate>
 <dc:creator>cgacfox</dc:creator>
 <guid isPermaLink="false">comment 1151596 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151595</link>
    <description> &lt;p&gt;The cfparam should go immeadiatly before your query to add the data to the database.&lt;/p&gt;
&lt;p&gt;You can find a good explanation of the cfparam tag and why you should use it &lt;a href=&quot;http://tutorial138.easycfm.com/&quot; class=&quot;bb-url&quot;&gt;here on the EasyCFM&lt;/a&gt;  site that is packed with other ColdFusion tutorials and a very good CF forum as well...&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 May 2004 18:48:26 +0000</pubDate>
 <dc:creator>openmind</dc:creator>
 <guid isPermaLink="false">comment 1151595 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151594</link>
    <description> &lt;p&gt;Thanks very much for your help.  I have changed the checkbox info on the data entry form.  Where does this statement go?&lt;/p&gt;
&lt;p&gt;Also you suggested using CFQUERYPARAM.  Is this used in place of CFQUERY?  I am only going by what my instructor showed me to do.  I should receive a book that I ordered called &quot;Macromedia Coldfusion MX Web Application Construction Kit 5th Edition&quot; by Ben Forta in a couple of days.  Again thanks very much for all your help.&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 May 2004 18:29:50 +0000</pubDate>
 <dc:creator>cgacfox</dc:creator>
 <guid isPermaLink="false">comment 1151594 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/getting-errors-checkboxes-html-form#comment-1151593</link>
    <description> &lt;p&gt;OK two things wrong here.&lt;/p&gt;
&lt;p&gt;1 - Your checkboxes do not have a value assigned to them so change this:&lt;/p&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;p&gt;When you come to your query to add the data to the database you have to be handle the fact that the checkboxes may not be checked.  The simplest way is to just set a default parameter:&lt;/p&gt;
&lt;p&gt;When the form submits if this checkbox is not check the default 0 kicks in and if it is it set the parameter to 1.&lt;/p&gt;
&lt;p&gt;Now just amend you query to add the data:&lt;/p&gt;
&lt;p&gt;INSERT INTO DVDS&lt;br /&gt;
(MovieTitle, director, mainactors, studiohouse, Genre, description,&lt;br /&gt;
runningminutes, ParentalRating, seriesflag, seriesname, copyflag, mdlflag, gclflag, onloanflag,&lt;br /&gt;
onloandate, onloanname, requestorname)&lt;br /&gt;
VALUES&lt;br /&gt;
(&#039;#Form.MovieTitle#&#039;,&#039;#Form.director#&#039;,&#039;#Form.mainactors#&#039; &#039;#Form.studiohouse#&#039;,&lt;br /&gt;
&#039;#Form.genre#&#039;, &#039;#Form.description#&#039;, &#039;#Form.runningminutes#&#039;, &#039;#Form.parentalrating#&#039;,&lt;br /&gt;
#seriesflag#, &#039;#Form.seriesname#&#039;, #copyflag#, #mdlflag#,&lt;br /&gt;
#gclflag#, #onloanflag#, &#039;#Form.onloandate#&#039;, &#039;#Form.onloanname#&#039;,&lt;br /&gt;
&#039;#Form.requestorname#&#039;)&lt;/p&gt;
&lt;p&gt;Two there things.&lt;/p&gt;
&lt;p&gt;1 - Only use single apostrophes around data values when the data type is text not numbers&lt;br /&gt;
2 - Try and get into the hapit of using the CFQUERYPARAM tag in your queries as it speeds things up and helps secure the query against malicios users.&lt;/p&gt;
&lt;p&gt;One last point, never show your datasource name in posts as a malicious user could use it against you when the site is live...&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 May 2004 18:07:15 +0000</pubDate>
 <dc:creator>openmind</dc:creator>
 <guid isPermaLink="false">comment 1151593 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
