Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL7 text -> ntext convert error

Status
Not open for further replies.

dankes

Programmer
Jul 17, 2001
2
RU
Hello guys.
I'm using SQL7 on Win2k Server SP2 , VB6, ADO 2.5
Default language - English.

I have the table something like that:

Create Table SomeTable (
MsgID int identity(1,1),
XUIDL nvarchar(255),
From nvarchar(255),
...
[other stuff]
....
MsgBody ntext
)

It is used to store parsed MIME e-mails.
When I try to store an e-mail which size is more than 8192 bytes and Content-Encoding differs from iso-8859-1(Western Latin), the following error occurs: 'Cannot convert text to ntext'. But it works fine on SQL2000.
I'd spent couple of hours to search through MS KB and MSDN, but I didn't find anything.
Any ideas (collations, default language etc...)?


 

How are you storing the records? Is it possible to do an explicit conversion (i.e., Cast(textdata as ntext)) before storing the data? Terry Broadbent


"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
I'm using stored procedure.

CAST doesn't accept text, ntext or image as argument, and I can't declare input parameter as varchar or nvarchar because the size of data could be larger than 8(4)K.

Explicit conversion in VB didn't help me much also, at least the following code:

txtdata = StrConv(txtdata, vbUnicode)

I think there's nothing to be changed in stored procedures.
It's ADO level or some DB settings
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top