S. Isaac Dealey wrote:
> I have a db where I had been using a text field and I'm converting it to an
> ntext field so that the db can potentially support unicode at a much later
> date.
> 
> The problem I'm having is this: I'm not just opening the db and changing the
> field to ntext, I created a new db and created the new table with ntext and
> am importing the data from the original db using a query. On one record in
> particular, I get a right-data truncation error. Do text and ntext fields
> not have the same maximum length? Is the size of the data more limited in an
> ntext field as a result of using a larger number to represent each
> character?

Max lengths of fields is implementation defined, but usually the length 
in characters is for ntext is half that of text (wil result in the same 
length in bytes is a 2-byte form-of-use).
To figure out what is exactly going one, try to compare the results of 
the character_length() function (number of characters) with the results 
of the octet_length() function (number of bytes). (Those are the 
official names, your database might have named them differently.)

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to