View Single Post
  #1 (permalink)  
Old September 26th, 2005, 02:16 AM
mat41 mat41 is offline
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Problem Exporting Data...

Hi!

A client is trying to export the table into another database but receives the following error:
"The value is not consistent with the data type or length of the
column." So far I can't replicate the issue on any of my test
environments. (this is not the problem tho... =))

However, when you do try to copy the row and paste it at the end of the SAME table. you the the same error:
"The value you enetered is not consistent with the data type or
length of the column."

And I find this bizarre because 1) it IS already in the database with no problems and 2) the field is of type Text - which should accommodate very long text values.

I also found this same problem occuring in fields of type VarChar.

Also, in trying to solve the problem, I found that the problem is caused by a CHR(13) [vbCr] and a CHR(10) [vbLf] at the end of the text, and deleting them allows you to paste the rebellious row (but doesn't make the export problem go away). However, I also found a few rows that end with those characters but does NOT generate the error when copied and pasted.

MS SQL Server database bug? What can I do to solve it?

A sample of the table is available as a database backup from http://users.tpg.com.au/adslnl7k/gw/test.zip

Thanks !!


Wind is your friend
Matt
__________________
Wind is your friend
Matt
Reply With Quote