4 Replies Latest reply: Jan 24, 2011 9:40 AM by <Bryan> RSS

    CFSQLTYPE CF_SQL_INTEGER

    <Bryan>

      Using ColdFusion 9/Standalone, Access database

      Can anyone tell me what this error means (CFSQLTYPE CF_SQL_INTEGER)? I received it while processing a simple form. Is it related to the data being processed or something to do with how the field is defined in Access?

       

      Thanks!

        • 1. Re: CFSQLTYPE CF_SQL_INTEGER
          -==cfSearching==- Community Member

          Could you post the code used and the full error message?

          • 2. Re: CFSQLTYPE CF_SQL_INTEGER
            <Bryan> Community Member

            Here's the form page and update page:

             

            **** ERROR MESSAGE ****

             

            Invalid data #GetDetail.QQS_ID# for CFSQLTYPE CF_SQL_INTEGER.

            The error occurred in C:\ColdFusion9\wwwroot\QQSTracker\QQS_Update2.cfm: line 1
            1 : <CFUPDATE datasource="qqstrack" Tablename="Detail">
            2 : <cflocation url="Proj_List.cfm">
            

            Resources:

             

            Browser  Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SearchToolbar 1.2; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; MS-RTC LM 8)
            Remote Address  127.0.0.1
            Referrer  http://127.0.0.1:8500/QQSTracker/QQS_Edit2.cfm?QQS_ID=22
            Date/Time  24-Jan-11 11:25 AM

             

            **** FORM PAGE ****

             

            <cfquery name="GetDetail" datasource="qqstrack">
            SELECT *
            FROM detail
            WHERE QQS_ID = #url.QQS_ID#
            </cfquery>

             

            <form action="QQS_Update2.cfm" method="post">
            <input type="hidden" name="QQS_ID" value="#GetDetail.QQS_ID#">

            <table width="770" cellpadding="0" cellspacing="0">
            <tr>
              <td width="100%" align="center" colspan="3"><img src="images/header_1.jpg" border="0"><br>
              <img src="images/header_2.jpg" border="0"><br><img src="images/boxtop.jpg" border="0"></td>
            </tr>
            <tr>
              <td width="18" id="sideleft"> </td>
              <td width="744" id="boxinside">
               <cfoutput query="GetDetail">
                  <table width="100%" cellpadding="5" cellspacing="0">
                <tr>
                 <cfif #ProjectName# IS "No">
                 <td valign="top" id="ProjName" colspan="2"><input type="text" name="ProjectName" size="30" value="#ProjectName#"></td>
                 <cfelse>
                 <td valign="top" id="ProjName" colspan="2">#ProjectName#</td>
                 </cfif>
                </tr>
                <tr>
                 <td valign="top" width="185" id="leftpane" style="padding:10px">
                 <table width="100%" cellpadding="5" cellspacing="2">
                  <tr>
                   <td valign="top" id="text3"><b>Start Date</b>:
                   <input type="text" name="Start_date" size="8" value="#dateformat(Start_Date, "mm/dd/yyyy")#"></td>
                  </tr>
                  <tr>
                   <td valign="top" id="text3"><b>Due Date</b>:
                   <input type="text" name="Due_Date" size="8" value="#dateformat(Due_Date, "mm/dd/yyyy")#"></td>
                  </tr>
                  <tr>
                   <td valign="top" id="text3"><b>Target Date</b>:
                   <input type="text" name="Target_Date" size="8" value="#dateformat(Target_Date, "mm/dd/yyyy")#"></td>
                  </tr>
                  <tr>
                   <td valign="top" id="text3"><b>Actual Date</b>:
                   <input type="text" name="Actual_Date" size="8" value="#dateformat(Actual_Date, "mm/dd/yyyy")#"></td>
                  </tr>
                  <tr>
                   <td valign="top" id="text2"><b>Agency</b><br>
                   <input type="text" name="agency" size="20" value="#agency#"></td>
                  </tr>
                  <tr>
                   <td valign="top" id="text2"><b>Lead<b></br>
                   <input type="text" name="lead" size="20" value="#lead#"></td>
                  </tr>
                  <tr>
                   <td valign="top" id="text2"><b>Campaign: <b>
                    <select name="Campaign">
                    <option value="#Campaign#" selected>#Campaign#
                    <option value="Infrastructure Building">Infrastructure Building
                    <option value="Demand Generation">Demand Generation
                    </select></td>
                  </tr>
                  <tr>
                   <td valign="top" id="text2"><b>Funding Source: <b>
                    <select name="Funding">
                    <option value="#Funding#" selected>#Funding#
                    <option value="Campaigns">Campaigns
                    </select></td>
                  </tr>
                 </table>
                 </td>
                 <td valign="top" width="510" style="padding:10px">
                 <table width="100%" cellpadding="0" cellspacing="4">
                  <tr>
                   <td valign="top" id="rightpane">
                   <table width="100%" cellpadding="3" cellspacing="0">
                    <tr>
                     <td valign="top" id="tableheader">QQS Status</td>
                     <td valign="top" id="tableheader">Dev Status</td>
                     <td valign="top" id="tableheader">Phase</td>
                     <td valign="top" id="tableheadernohr">Target Quarter</td>
                    </tr>
                    <tr>
                     <td valign="top" id="text">
                      <select name="Status">
                      <option value="#Status#" selected>#Status#
                      <option value="Proposed">Proposed
                      <option value="QQS sent to vendor">QQS sent to vendor
                      <option value="SOW sent to vendor">SOW sent to vendor
                      <option value="Submitted for approval">Submitted for approval
                      <option value="Approved">Approved
                      </select></td>
                     <td valign="top" id="text">
                      <select name="Dev_Status">
                      <option value="#Dev_Status#" selected>#Dev_Status#
                      <option value="Planned">Planned
                      <option value="In-progress">In-progress
                      <option value="Completed">Completed
                      </select></td>
                     <td valign="top" id="text">
                      <select name="Phase">
                      <option value="#Phase#" selected>#Phase#
                      <option value="Not Started">Not Started
                      <option value="Development">Development
                      <option value="On-going">On-going
                      <option value="Completed">Completed
                      </select></td>
                     <td valign="top" id="textnohr">
                      <select name="Target_Quarter">
                      <option value="#Phase#" selected>#Target_Quarter#
                      <option value="Q1">Q1
                      <option value="Q2">Q2
                      <option value="Q3">Q3
                      <option value="Q4">Q4
                      </select></td>
                    </tr>
                   </table>
                   </td>
                  </tr>
                  <tr>
                   <td valign="top" id="rightpane2">
                   <table width="100%" cellpadding="3" cellspacing="0">
                    <tr>
                     <td valign="top" id="tableheader">Project Cost</td>
                     <td valign="top" id="tableheader">Q1 Cost</td>
                     <td valign="top" id="tableheader">Actual Q1 Cost</td>
                     <td valign="top" id="tableheadernohr">Actual Q1 Cost</td>
                    </tr>
                    <tr>
                     <td valign="top" id="text"><input type="text" name="Project_Cost" size="10" value="#Project_Cost#"></td>
                     <td valign="top" id="text"><input type="text" name="Q1_Costs" size="10" value="#Q1_Costs#"></td>
                     <td valign="top" id="text"><input type="text" name="Actual_q1_Costs" size="10" value="#Actual_q1_Costs#"></td>
                     <td valign="top" id="textnohr"><input type="text" name="Agency_Estimate" size="10" value="#Agency_Estimate#"></td>
                    </tr>
                   </table>
                   </td>
                  </tr>

            </table>
                 </td>
                </tr>
                <tr>
                 <td valign="top" align="center" colspan="2" style="border-top: solid 1px abcabe;">
                 <input type="submit" value="Update">
                 </td>
                </tr>
                  </table>
               </cfoutput>
              </td>

              </tr>

            </table>

            </form>

             

            ****** UPDATE PAGE *****

             

            <CFUPDATE datasource="qqstrack" Tablename="Detail">
            <cflocation url="Proj_List.cfm">

            • 3. Re: CFSQLTYPE CF_SQL_INTEGER
              -==cfSearching==- Community Member
              <input type="hidden" name="QQS_ID" value="#GetDetail.QQS_ID#">

               

              The error means the value provided for QQS_ID is not an integer.  It looks like you are missing <cfoutput> tags around the input field. So the field literally contains the string "#GetDetail.QQS_ID#", not the value of that variable.

               

              WHERE QQS_ID = #url.QQS_ID#

               

              As an aside, it is good to get into the habit of using cfqueryparam on all query parameters.

              • 4. Re: CFSQLTYPE CF_SQL_INTEGER
                <Bryan> Community Member

                You're right, that was a stupid mistake. Thanks for pointing it out.

                 

                I haven't used cfqueryparam before, thanks for the suggestion!