Link to home
Start Free TrialLog in
Avatar of CoolChi
CoolChi

asked on

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

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

try to use the substring(your_ntext_field, 1, 4000) to get a usable value
Avatar of CoolChi
CoolChi

ASKER

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.....
Avatar of CoolChi

ASKER

Forgot to mention that I am using ASP with VBScript on Window Server 2003 and the SQL Server for database
Avatar of CoolChi

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CoolChi

ASKER

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?
>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.