How to fix Error 1406 while using Connector/C++?

  • Follow


I am using MySQL Connector/C++ as client, but I meet Error code 1406
while I am trying to insert Blob kind of data into MySQL.

The size of Blob I want to insert is 100K. The MySQL server gives me a
error message:
--------------
ERR: Data too long for column 'longstring' at row 1 (MySQL error code:
1406, SQLState: 22001 )
--------------

I am using setBlob() to insert this data. But this still happen. Why?

Thanks

Water Lin

-- 
Water Lin's notes and pencils: http://en.waterlin.org
Email: WaterLin@ymail.com
0
Reply WaterLin (12) 11/13/2009 8:20:36 AM

On Nov 13, 3:20=A0am, Water Lin <Water...@ymail.invalid> wrote:
> I am using MySQL Connector/C++ as client, but I meet Error code 1406
> while I am trying to insert Blob kind of data into MySQL.
>
> The size of Blob I want to insert is 100K. The MySQL server gives me a
> error message:
> --------------
> ERR: Data too long for column 'longstring' at row 1 (MySQL error code:
> 1406, SQLState: 22001 )
> --------------
>
> I am using setBlob() to insert this data. But this still happen. Why?

What is the actual type of the column?

>
> Thanks
>
> Water Lin
>
> --
> Water Lin's notes and pencils:http://en.waterlin.org
> Email: Water...@ymail.com

0
Reply toby23 (1080) 11/13/2009 3:45:41 PM


1 Replies
278 Views

(page loaded in 0.047 seconds)

Similiar Articles:













7/23/2012 7:43:26 AM


Reply: