473,378 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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
Jul 19 '05 #1
1 4456
http://www.aspfaq.com/2188

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


"tony" <test> wrote in message news:u8**************@TK2MSFTNGP09.phx.gbl...
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

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: KathyB | last post by:
Hi, I've read conflicting articles on updating an ntext field in a column. My ntext field will exceed 8,000 characters (typically twice that size -- but just a text string). One article (I...
1
by: Bill | last post by:
Hi all, I have an asp page that writes to an ntext field in SQL Server 2000. All was going well until I had to put in a section of text greater than 8000 bytes. Then I got a timeout error and...
2
by: Martin | last post by:
Dear Group I admit, this might be a very ignorant question. BOL says about the ntext data type: Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters. ...
5
by: Cally | last post by:
Hello, I would like to convert a field from ntext field found in one database table to float field found in another database table. The reason why I want to do this is a long one. I have...
1
by: A_PK | last post by:
I got one field, NOTE, its type is Ntext field. I have problem when query the statement using GROUP BY, could some pls kindly guide me. please found the sql query below... SELECT...
4
by: Igor | last post by:
I have one SELECT statement that needs to return one ntext field from one table and count something from other table, problem is that all fileds that are not in count have to be in group by and...
3
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
I try to follow Steve's paper to build a database, and store a small text file into SQL Server database and retrieve it later. Only difference between my table and Steve's table is that I use NTEXT...
3
bwesenberg
by: bwesenberg | last post by:
Hello, I am having and issue with an ntext field. It seems to have a limitation on it. Here is the history. I am supporting a database that was created by a prior employee and I am now...
1
by: leedatkinson | last post by:
Hi, I'm pretty new to using SQL as a long standing Access users all these field types are a bit much... I have a ntext field that I need to convert to a nvarchar. I have tried cast and convert and as...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.