Click here to Skip to main content
15,886,780 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I had to create a table in MySQL. To do that, I was importing excel file into MySQL. However, whenever I was trying to do so, an error appeared saying:
Row import failed with error: ("Data truncated for column 'user_type' at row 1", 1265)

After I stop importing, a prompt box appears to report bug and says:
Cannot access a disposed object.
Object name:'_ProgressBar'

What I have tried:

I tried deleting MySQL folder from %appdata%
Posted
Updated 30-Sep-22 23:53pm

1 solution

The error "Data truncated for column 'user_type' at row 1 means that the data does not fit in the column: if you use VARCHAR or NVARCHAR columns, they default to a fixed length of 50 characters. If you exceed that, the data would have to be shortened to fit and you get this error because SQL is not willing to do that. Probably, you need to increase the size of at least one column to accommodate the data you provide.

The other error probably means that you create your connection inside a using block, which closes and disposes the connection when you leave it for any reason.
It you have a try...catch block around the whole using block and you try to close the connection (or do anything else with it) in the catch or finally blocks, the connection does not exist any more and you get the disposed error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900