Professional Web Applications Themes

8000 Character Limit - Coldfusion Database Access

When inserting data via a CFQUERY or CFSTOREDPROC tag into a SQL Text field (SQL 2K) or a SQL varchar(MAX) (SQL 2K5) I am finding that it does not insert all of the data if the data and SQL statement combined are greater than 8000 characters. For instance, take the following statement: INSERT INTO table(myData) VALUES('...9000 characters...') That statement insert the first 7965 characaters into myData. How can I overcome this limitation? Thanks for any help, Keith...

  1. #1

    Default 8000 Character Limit

    When inserting data via a CFQUERY or CFSTOREDPROC tag into a SQL Text field
    (SQL 2K) or a SQL varchar(MAX) (SQL 2K5) I am finding that it does not insert
    all of the data if the data and SQL statement combined are greater than 8000
    characters. For instance, take the following statement:

    INSERT INTO table(myData) VALUES('...9000 characters...')

    That statement insert the first 7965 characaters into myData. How can I
    overcome this limitation?

    Thanks for any help,

    Keith

    CFDaddy Guest

  2. #2

    Default Re: 8000 Character Limit

    CFDaddy wrote: 
    Or Enterprise manager or an other method to insert data into your database.

    SQL Server char|varchar fields have a maximum limit of 8000 characters.
    If you need to go beyond this you need to use other field types, CLOB
    perhaps.
    Ian Guest

  3. #3

    Default Re: 8000 Character Limit

    Use a text or ntext data type, as varchar / char max out at 8000
    characters, and nvarchar / nchar max out at 4000.

    text

    Variable-length non-Unicode data with a maximum length of 2^31 - 1
    (2,147,483,647) characters.


    Phil

    paross1 Guest

  4. #4

    Default Re: 8000 Character Limit

    Phil,
    Thanks for the reply, however as stated in the original post, I have tried
    this with TEXT and VARCHAR(MAX) in SQL2K5 which allows 2^31 or roughly 2GB
    instead of 8K. The field type is not the issue here I don't beleive. I think
    it might have something to do with the ODBC driver or that the SQL server
    processes requests this way differently. I just can't find any solutions
    elsewhere.

    Simply create a table, add 1 TEXT colum and do a simple CFQUERY and insert
    10K or so of data. You'll see what I mean (hopefully).

    Again, Thanks for the repsonse,

    Keith

    CFDaddy Guest

  5. #5

    Default Re: 8000 Character Limit

    Don't use an ODBC driver. ODBC s. Use a pure JDBC driver.
    Kronin555 Guest

  6. #6

    Default Re: 8000 Character Limit

    Ok ok ok, I have to admit that sometimes my brain misfires and this is one of
    those times. Although I had in fact had the coulm defined as a varchar(max) I
    was instead of using the query using a stored proc which the input param was
    defined as varchar(8000).

    I now retire to wallow in my stupidity. Thank you to all who attempted to
    help.

    Keith

    CFDaddy Guest

Similar Threads

  1. Telnet character limit?
    By rfolden in forum PERL Modules
    Replies: 3
    Last Post: February 3rd, 12:08 AM
  2. 16 character password limit; need work-around
    By quasigenx in forum Coldfusion Database Access
    Replies: 1
    Last Post: June 29th, 04:07 PM
  3. How to limit character output with CFML
    By KidKodiak in forum Macromedia ColdFusion
    Replies: 3
    Last Post: June 22nd, 06:36 AM
  4. TOC character limit, glitch?
    By Bill_Gibbs@adobeforums.com in forum Adobe Indesign Windows
    Replies: 4
    Last Post: July 17th, 11:22 AM
  5. CDONTS-Sending HTML mail-8000 character limit
    By Shane Porter in forum Microsoft SQL / MS SQL Server
    Replies: 3
    Last Post: July 7th, 07:56 PM

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