Can't read NTEXT column with GetRows

Hi experts,
I m having problem reading the data in ntext column with the function GetRows
I try to read the a row of data into an array. There are no problem to retrieve data from the array for all columns except for the ntext data type column.

Can anyone help me with this? Thanks!

Michael Tai

CoolChiAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you might try to change the data type from NTEXT to NVARCHAR(4000), which can store up to 4000 characters.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
try to use the substring(your_ntext_field, 1, 4000) to get a usable value
0
 
CoolChiAuthor Commented:
Here's my code.....how should I change it?

RowInfo = Rs.GetRows(1)
Setting = RowInfo(5,0) <=====the column with ntext data type
Setting = Split(RowInfo(5,0),"|||")

This will end up with (Subscript out of range) error because the RowInfo(5,0) can't be retrieve.....
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
CoolChiAuthor Commented:
Forgot to mention that I am using ASP with VBScript on Window Server 2003 and the SQL Server for database
0
 
CoolChiAuthor Commented:
I am migrating my codes from Access Compatible to SQL Server
There isn't any problem with Access database and the memo data type for the column, this problem only occurs on SQL Server with ntext data type.
0
 
CoolChiAuthor Commented:
Is there any other way other than this? This might temporarily help with my problem but what if when I have value that is more than 4000 characters that need to be stored?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>but what if when I have value that is more than 4000 characters that need to be stored?
you will need to split up the value into several parts (1 row per part), or use indeed NTEXT, but change alot of programming around that.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.