Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    8

    Unanswered: sql ntext data truncates in asp

    The sql database has an ntext (16) field which contains "information" and is used as a free form turnover log. When I bring this data into an ASP page the "information" gets truncated.

    I have tried getchunk, however all formatting on the field is lost.
    I have tried putting the field at the end of my query - no change.
    I have tried querying the data as a separate sqlrs connection - no change.
    I have tried using substring to break it down, the first substring works, however I get errors on the second (Expression result length exceeds the maximum. 8000 max, 12000 found).

    I also tried to use substring in sql query anaylzer - and only get the first ~4180 characters.

    Is there a way to split this field into multiple nvarchar fields in my temporary table in sql and then concatenate back together in asp report???

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    Where does the data get truncated? Does it appear truncated in the form or prior that? Are spaces replaced by   (assuming ASP = VBScript).

    The analzer has a build in maximum of characters so you may hit that limit. I'm not sure though

  3. #3
    Join Date
    Nov 2004
    Posts
    8
    ASP is vbscript.

    The data is truncated when using
    response.write("<td width='100%' colspan='4'>" & strIssue & " </td>")

    to write dat out to screen.

    The data is entered via a vb application which shows everything on the screen and also in the canned VB reports. Problem occurs with the asp page.

  4. #4
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by Pam Engel
    ASP is vbscript.

    The data is truncated when using
    response.write("<td width='100%' colspan='4'>" & strIssue & " </td>")

    to write dat out to screen.

    The data is entered via a vb application which shows everything on the screen and also in the canned VB reports. Problem occurs with the asp page.
    Its just working fine in my machine..check the data after storing in the database.
    <%
    dim conn
    dim rs
    set conn=server.CreateObject("ADODB.Connection")
    conn.open"Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=joy"
    set rs=server.CreateObject("ADODB.Recordset")
    rs.open("select * from gogo"),conn

    response.write("<td width='100%' colspan='4'>" & rs("info") & " </td>")

    %>
    table stucture...
    create table gogo(info ntext)
    insert into gogo values('Insert a very large data')
    select info from gogo
    Joydeep

Posting Permissions

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