Too much text

Results 1 to 5 of 5

Thread: Too much text

  1. #1
    Jay Ar Guest

    Default Too much text

    I&#039ve got an update form with around 30 textfields. I&#039m using SQL server. Everything works fine until the total number of characters in all the text fields excedds 8000. At the moment, i&#039m using a simple update string:<BR><BR>strSQL="UPDATE dbo.table set field =&#039" & Request("desc1") & etc<BR><BR>Would I need some more complex scripting or would I need to change the database design?

  2. #2
    SPG Guest

    Default Change the DB Design

    I&#039ve encountered this, generally with a nVarChar field of a few thousand characters. You can either restrict that field (which has worked for me) or expand it to a less/non-restricted nText field. The nText field has some special characteristics about it (I don&#039t recall all of them at the moment, sorry; I think most of them involve the fact that it&#039s not indexed so it won&#039t hurt performance -- check MSDN) which free it from that restriction.<BR><BR>HiH,<BR>SPG

  3. #3
    Jay Ar Guest

    Default RE: Change the DB Design

    Thanks for replying. I shall take a look at the data types and see if that makes a difference. It seems to me to be a problem with forms. I can add up all the characters entered into the 30 text areas. If that total exceeds 8000, I get the error, otherwise it&#039s OK. It doesn&#039t seem specific to a certain field. Also, I had some advice about using READTEXT, but couldn&#039t find any reference to it in my ASP books. It&#039s as though you have to set up a loop to read the text into your variable a chunk at a time.

  4. #4
    Jay Austin Guest

    Default RE: Change the DB Design

    As it seems your text is quite large, I would also recommend that you use TEXT fields in your DB as opposed to large VarChar fields. Some of the TEXT fields restrictions include the inability to select off of them.<BR><BR>Also, normal VarChar and Char fields have a max size of 8000 characters, nVarChar/nChar are 4000 as they are unicode fields. if you do not need unicode, then avoid them.<BR>

  5. #5
    Jay Ar Guest

    Default RE: Change the DB Design

    Thanks for the help guys. I guess I was put off by the fact that I&#039m try to update about 300 characters into each of the 30 text field. Thus exceeding the 8000 in total. I&#039ll play about with the data types and see what happens.

Posting Permissions

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