ntext field not showing up (ASP)

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default ntext field not showing up (ASP)

    I changed the datatype of a field in a SQL Server 2000 database from
    nvarchar to ntext, but now nothing is being displayed. The "Body" column of
    the datatable used to be nvarchar(8000) and the below code works fine.
    However once I changed the datatype of "Body" from nvarchar to ntext, it no
    longer is displayed. Changing the field back to nvarchar and it is fine
    again. Is there a special way for me to retrieve ntext fields? Any help
    will be greatly appreciated.


    set locDBConn = Server.CreateObject("ADODB.Connection")
    locDBConn.Open DSN
    sql = "SELECT * FROM Test;"
    set rs = locDBConn.Execute(sql)

    if (not IsNull(rs("ID"))) then
    Response.Write("ID: " & rs("ID") & "<BR>")
    end if

    'This is the nText field
    if (not IsNull(rs("Body"))) then
    Response.Write("BODY: " & rs("Body") & "<BR>")
    end if


    -Tony
    -Web Developer


    tony Guest

  2. Similar Questions and Discussions

    1. Retrieve ntext field using ODBC Socket
      Help....! I just upgraded cfmx6.1 to cfmx7, and all queries retrieve ntext field from MS SQL Server fail. It displays nothing or empty string...
    2. not showing a field if empty
      Hi I have database query and the results are displayed on a page, now some of the fields are empty and they take up space. I wanted to know if...
    3. Lenght of NText field
      I have been using MSAccess databases when working with CF for the past 8 years. The following query or something very much like it has been hugly...
    4. Showing only first part of the field in datagrid
      Hi, I have a XML file as datasource, and I bind it to datagrid. Size of one of the columns in the dataset is quite long and I would like to show...
    5. Updating part of the text in an NTEXT field
      SQL Server Version - 7 Table - Pages Field - Content Hi, I need to update an ip address in an ntext field. I have looked at UPDATEXT, the...
  3. #2

    Default Re: ntext field not showing up (ASP)

    PLEASE DON'T MULTI-POST.

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand - MVP Guest

Posting Permissions

  • You may not post new threads
  • You may 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