Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005
    Posts
    94

    Unanswered: Recordset Field Limit???

    Hey Everyone,

    I have what seems to be a unique problem, which I am not sure if it is an ASP problem or an SQL Server issue. I'm making a website that pulls its content from ntext fields within SQL Server 2000.

    Heres my problem, when I pull the data into the page it cuts off the text from the field at a certain spot. I pulled the data into a variable and did some tests on it, if I run length on it I get 1023 and also if I run length on just the recordset field I also get 1023. But if I check the SIZE of the recordset I get a return of 2046. I have had this problem before with an Access database as well but it seems as if the amount of characters that it cut off at with the access database was in the 200's. I've self taught myself ASP so this could very easily be something I have missed. Same for both Access and SQL Server.
    ImageMage

    Access 2003, Dreamweaver MX 2k4, and everything else work piles on me

    Aspiring NEWB

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    One mystery is easy enough. ntext is a double-byte system, so 1023 characters takes up 2046 bytes.

    The other mystery is a bit harder to figure. What sort of variable are you retrieving the data into? If it is not declared, it is probably a variant datatype, which could top out at 1k. I am not too good with VB6 datatypes, but have you tried casting the variable as VB's equivalent of text?

  3. #3
    Join Date
    Mar 2005
    Posts
    94
    Well I'm not using ASP.Net so no type casting, and actually I wasn't originally pulling the data into a variable type, I only done so to do those tests. I am pulling the data onto the page with the following

    <%=(recordset.Fields.Item("ntextfield").Value)%>

    But I did set a variable equal to that to check the length and size.
    Last edited by ImageMage; 12-05-05 at 11:23.
    ImageMage

    Access 2003, Dreamweaver MX 2k4, and everything else work piles on me

    Aspiring NEWB

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    I got nothing on that. Most I have ever worked with in ASP is varchar(1000). If you retreive the value into a variable, I take it you get the same result?

    And I suppose there is no possiblity of you not using ntext? Terribly finicky stuff. At least, if you can avoid using chinese/japanese/greek/hebrew letters in your text, you can demote it down to just text. Likely, you can get a way with a varchar(4000) field or something.

  5. #5
    Join Date
    Mar 2005
    Posts
    94
    It is like that cuz the data being pulled in can sometimes be up to 10000 characters long.... Ugh I bet thats going to cause me major headaches before this is said and done
    ImageMage

    Access 2003, Dreamweaver MX 2k4, and everything else work piles on me

    Aspiring NEWB

Posting Permissions

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