Professional Web Applications Themes

Field Length Help - Coldfusion Database Access

I added a new field to my database: <CFQUERY NAME="addColumn" DATASOURCE="#APPLICATION.dsn#" USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#"> ALTER TABLE users ADD user_info varchar(1000); </CFQUERY> Then I tried to add data to the field in the databse: <CFQUERY NAME="updateUser" DATASOURCE="#APPLICATION.dsn#" USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#"> UPDATE users SET user_info = "Robert has over 10 years experience in the trade show and marketing industries. His expertise and experience in these areas, produces an advantageous relationship for our clients. Due to his knowledge of the area Robert understands the delicate intricacies that need to be managed and fulfilled to execute an effective and efficient campaign. Robert's passion for perfection in ...

  1. #1

    Default Field Length Help

    I added a new field to my database:

    <CFQUERY NAME="addColumn" DATASOURCE="#APPLICATION.dsn#"
    USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
    ALTER TABLE users
    ADD user_info varchar(1000);
    </CFQUERY>

    Then I tried to add data to the field in the databse:

    <CFQUERY NAME="updateUser" DATASOURCE="#APPLICATION.dsn#"
    USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
    UPDATE users
    SET
    user_info = "Robert has over 10 years experience in the trade show and
    marketing industries. His expertise and experience in these areas, produces an
    advantageous relationship for our clients. Due to his knowledge of the area
    Robert understands the delicate intricacies that need to be managed and
    fulfilled to execute an effective and efficient campaign. Robert's passion for
    perfection in all projects ensures our clients, the best elements of each
    aspect of a new marketing project. His experience and knowledge is passed on to
    the client by his ability to recognize the advantages and disadvantages of
    marketing techniques/resources, from products to sales personnel
    personalities."
    WHERE user_ID = 11
    </CFQUERY>

    But when I do I get this error message:
    -------------------------------------------------------------

    Error Executing Database Query.
    [Macromedia][SQLServer JDBC Driver][SQLServer]The identifier that starts with
    &apos;Robert has over 10 years experience in the trade show and marketing
    industries. His expertise and experience in these areas, pro&apos; is too long.
    Maximum length is 128.

    The error occurred in
    \\10.0.0.112\boxinc.ca\public\admin2112\scripts\up dateUsers.cfm: line 30

    28 : </CFIF>
    29 :
    30 : <CFQUERY NAME="updateUser" DATASOURCE="#APPLICATION.dsn#"
    USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
    31 : UPDATE users
    32 : SET




    --------------------------------------------------------------------------------

    SQL UPDATE users SET user_info = "Robert has over 10 years experience in
    the trade show and marketing industries. His expertise and experience in these
    areas, produces an advantageous relationship for our clients. Due to his
    knowledge of the area Robert understands the delicate intricacies that need to
    be managed and fulfilled to execute an effective and efficient campaign.
    Robert's passion for perfection in all projects ensures our clients, the best
    elements of each aspect of a new marketing project. His experience and
    knowledge is passed on to the client by his ability to recognize the advantages
    and disadvantages of marketing techniques/resources, from products to sales
    personnel personalities." WHERE user_ID = 11




    Error Executing Database Query.
    [Macromedia][SQLServer JDBC Driver][SQLServer]The identifier that starts with
    &apos;Robert has over 10 years experience in the trade show and marketing
    industries. His expertise and experience in these areas, pro&apos; is too long.
    Maximum length is 128.

    The error occurred in
    \\10.0.0.112\boxinc.ca\public\admin2112\scripts\up dateUsers.cfm: line 30

    28 : </CFIF>
    29 :
    30 : <CFQUERY NAME="updateUser" DATASOURCE="#APPLICATION.dsn#"
    USERNAME="#APPLICATION.dbuser#" PASSWORD="#APPLICATION.dbpass#">
    31 : UPDATE users
    32 : SET




    --------------------------------------------------------------------------------

    SQL UPDATE users SET user_info = "Robert has over 10 years experience in
    the trade show and marketing industries. His expertise and experience in these
    areas, produces an advantageous relationship for our clients. Due to his
    knowledge of the area Robert understands the delicate intricacies that need to
    be managed and fulfilled to execute an effective and efficient campaign.
    Robert's passion for perfection in all projects ensures our clients, the best
    elements of each aspect of a new marketing project. His experience and
    knowledge is passed on to the client by his ability to recognize the advantages
    and disadvantages of marketing techniques/resources, from products to sales
    personnel personalities." WHERE user_ID = 11
    DATASOURCE boxinc_boxinc_ca
    VENDORERRORCODE 103
    SQLSTATE HY000
    -------------------------------------------------------------

    Please help! Why does it tell me the max length is 128 when i specified
    varchar(1000)?


    canswim Guest

  2. #2

    Default Re: Field Length Help

    First of all, you are surrounding your text with double quotes. Also, I noticed that you have a single quote in the middle of your text (Robert's passion ).

    Phil
    paross1 Guest

  3. #3

    Default Re: Field Length Help

    yes that was it, thanks Robert i figured it out once i went back and looked at it again..I hate wasting time on such silly mistakes.

    Mike
    canswim Guest

Similar Threads

  1. Length cannot be less than zero. Parameter name: length
    By ctk70 in forum ASP.NET Security
    Replies: 3
    Last Post: November 14th, 02:34 PM
  2. Query exists? Get size / length of field
    By johnmcgary in forum Coldfusion Database Access
    Replies: 2
    Last Post: July 21st, 06:03 AM
  3. Replies: 3
    Last Post: May 13th, 12:15 AM
  4. How to get length of string? length() problems
    By Mitchua in forum PERL Modules
    Replies: 5
    Last Post: July 17th, 12:08 AM
  5. Field length
    By Bebop & Rocksteady in forum FileMaker
    Replies: 9
    Last Post: July 13th, 01:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139