Skip to main content
Participant
October 22, 2011
Answered

Compatibility Issue IE on Windows 7

  • October 22, 2011
  • 2 replies
  • 832 views

I've created a cfm template that works fine on IE and Firefox on XP and Firefox on Windows 7; however it has problems with IE on Windows 7.  During an update action I get the following error

The '' fieldname cannot be found in the members table.

I don't see where I created the fieldname " and if I did, I would assume that this would be a problem in XP or Firefox on Windows 7.

Any clues on how to solve this issue?

TIA

    This topic has been closed for replies.
    Correct answer SLGeek

    The error

    The '' fieldname cannot be found in the [tablename] table.

    is caused by the <cfinput name="" type="Submit" value="submit">

    In ColdFusion 9, a "name" field is a required field for the CFINPUT tag.

    Earlier versions of Windows and IE ignore the name field in the "submit" tag; however, Windows 7 / IE does not ignore this name and there it looks to find the field "" in the database table.

    The work around for updates is to use

        

         <cfquery name="nameofquery" datasource="thedatasource">

              update [tablename]

                   set [var1] = #var1#,

                         [var2] = #var2#,

                            etc.

                   where is = #id#

         <.cfquery>

    For the cfinsert statement you need to enumerate the fields you want populated

         <cfinsert datasource="thedatasource" tablename="thetablename" formfields="[list of fieldnames, comma delimited]">

    2 replies

    SLGeekAuthorCorrect answer
    Participant
    October 23, 2011

    The error

    The '' fieldname cannot be found in the [tablename] table.

    is caused by the <cfinput name="" type="Submit" value="submit">

    In ColdFusion 9, a "name" field is a required field for the CFINPUT tag.

    Earlier versions of Windows and IE ignore the name field in the "submit" tag; however, Windows 7 / IE does not ignore this name and there it looks to find the field "" in the database table.

    The work around for updates is to use

        

         <cfquery name="nameofquery" datasource="thedatasource">

              update [tablename]

                   set [var1] = #var1#,

                         [var2] = #var2#,

                            etc.

                   where is = #id#

         <.cfquery>

    For the cfinsert statement you need to enumerate the fields you want populated

         <cfinsert datasource="thedatasource" tablename="thetablename" formfields="[list of fieldnames, comma delimited]">

    12Robots
    Participating Frequently
    October 22, 2011

    You should post your code.

    SLGeekAuthor
    Participant
    October 22, 2011

    Thanks ... quite a long script so I did not want to post the template.  I corrected the cfupdate problem by using the following code.

    <cfcase value="updatec">

        <cfparam name="FORM.1" default="0">

        <cfparam name="FORM.2" default="0">

        <cfparam name="FORM.3" default="0">

        <cfparam name="FORM.4" default="0">

        <cfparam name="FORM.5" default="0">

        <cfparam name="FORM.6" default="0">

        <cfparam name="FORM.7" default="0">

        <cfparam name="FORM.8" default="0">

        <cfparam name="FORM.9" default="0">

        <cfparam name="FORM.10" default="0">

        <cfparam name="FORM.11" default="0">

        <cfparam name="FORM.12" default="0">

        <cfparam name="FORM.13" default="0">

        <cfparam name="FORM.14" default="0">

        <cfparam name="FORM.15" default="0">

        <cfparam name="FORM.16" default="0">

        <cfparam name="FORM.17" default="0">

        <cfparam name="FORM.18" default="0">

        <cfparam name="FORM.19" default="0">

        <cfparam name="FORM.20" default="0">

        <cfparam name="FORM.20" default="0">

        <cfparam name="FORM.21" default="0">

        <cfparam name="FORM.22" default="0">

        <cfparam name="FORM.23" default="0">

        <cfparam name="FORM.24" default="0">

        <cfparam name="FORM.25" default="0">

        <cfparam name="FORM.26" default="0">

        <cfparam name="FORM.27" default="0">

        <cfparam name="FORM.28" default="0">

        <cfparam name="FORM.29" default="0">

        <cfparam name="FORM.30" default="0">

        <cfparam name="FORM.31" default="0">

        <cfquery datasource="charlie" name="updatecalendar">

            update calendar

            set [1] = #FORM.1#,

                [2] = #FORM.2#,

                [3] = #FORM.3#,

                [4] = #FORM.4#,

                [5] = #FORM.5#,

                [6] = #FORM.6#,

                [7] = #FORM.7#,

                [8] = #FORM.8#,

                [9] = #FORM.9#,

                [10] = #FORM.10#,

                [11] = #FORM.11#,

                [12] = #FORM.12#,

                [13] = #FORM.13#,

                [14] = #FORM.14#,

                [15] = #FORM.15#,

                [16] = #FORM.16#,

                [17] = #FORM.17#,

                [18] = #FORM.18#,

                [19] = #FORM.19#,

                [20] = #FORM.20#,

                [21] = #FORM.21#,

                [22] = #FORM.22#,

                [23] = #FORM.23#,

                [24] = #FORM.24#,

                [25] = #FORM.25#,

                [26] = #FORM.26#,

                [27] = #FORM.27#,

                [28] = #FORM.28#,

                [29] = #FORM.29#,

                [30] = #FORM.30#,

                [31] = #FORM.31#

            where id = #FORM.id#

        </cfquery>

       

        Your calendar has been updated.

       

    </cfcase>

    I'm working on the case for CFINSERT and adding the the formfields clause.