1 Reply Latest reply on Oct 14, 2007 6:33 PM by Newsgroup_User

    Anyone know exactly what this means?

    Level 7
      It works from Monday - Saturday, but bombs on Sunday

      Message Incorrect number of columns in row.
      Detail Verify the number of columns specified in the columns attribute and
      in the target file

      What exactly does this mean and what should I be looking for?

      I found this on google, but no resolution. Any ideas? Anyone know an
      alternate custom tag that can be used on a shared host?

      "Note: this only works if your columns do not contain a carriage return!
      You get a "Incorrect number of columns in row"

      For example: if you have a webapplication with database that has a
      memo-field (html textfield) and you have one or more carriage returns in it,
      these are (ofcourse) also stored in the database.

      Now if you cfhttp to a webpage that returns these database-results in a
      html-page, you get a page with extra carriage returns at the position of the
      carriage return from the memo-field.

      Every line in the http-response must be one row!"


      --
      Wally Kolcz
      MyNextPet.org
      Founder / Developer
      586.871.4126


        • 1. Re: Anyone know exactly what this means?
          Level 7
          Adobe Forums wrote:
          > It works from Monday - Saturday, but bombs on Sunday
          >
          > Message Incorrect number of columns in row.
          > Detail Verify the number of columns specified in the columns attribute and
          > in the target file


          i assume this question relates to your trying to read txt/csv files into
          your db, right?

          it then can mean:
          a) depending on the way you read files into the db: that at least one
          row of data has fewer or more items than expected (defined by the header
          row or by some rule imposed by your code, like number of columns of data
          to expect)
          b) as in the googled explanation: that at least one of the fields/items
          in the imported data has carriage returns stored in it, which ends the
          current data row with fewer data columns than expected.

          i suspect that on sundays you get your data in a bit different format
          than on other days...

          one way to get around the problem (if you can't change/enforce data
          model integrity) would be to
          - read your data file in row by row
          - in each row replace all carriage returns except the end-of-row one
          with spaces
          - check each row for correct number of data columns: import data if all
          correct; otherwise do not import that row, store the row data in some
          var/file and review later to see what was wrong with it

          hth



          --

          Azadi Saryev
          Sabai-dee.com
          http://www.sabai-dee.com