Re: nText field not displaying (ASP)
From: Val Mazur (group51a_at_hotmail.com)
Date: 05/28/04
- Next message: Vyacheslav Lanovets: "Re: ODBC(No column properties collection) vs Jet (alphabet ordering)"
- Previous message: Val Mazur: "Re: Problem using FMT=Delimited to read comma delimited"
- In reply to: tony: "nText field not displaying (ASP)"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 22:04:51 -0400
Hi Tony,
NTEXT is a BLOB-type field and you need to work with it differently. When
you need to read the value from any BLOB-type field, you need to use
GetChunk method of the Field, not the Value property of it
--
Val Mazur
Microsoft MVP
"tony" <test> wrote in message
news:%23zihRQBREHA.3124@TK2MSFTNGP12.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
>
>
- Next message: Vyacheslav Lanovets: "Re: ODBC(No column properties collection) vs Jet (alphabet ordering)"
- Previous message: Val Mazur: "Re: Problem using FMT=Delimited to read comma delimited"
- In reply to: tony: "nText field not displaying (ASP)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|