Good morning,
I'm trying to insert data into an existing Ms Access database (.mdb file). When I try to insert programmatically a new record in a table I have a problem with a memo field. It is returned this error:
"Unable to add the desired amount of data. The field is too small. Try to insert or paste less data"
I have Googled a lot for this problem but I have found no acceptable solutions for this problem.
Here the queries used:
Code:
1) INSERT INTO tblXXX ([note]) VALUES (?)
2) UPDATE tblXXX SET [note]=? WHERE YYY=?
Here the parameters added:
Code:
cmd.Parameters.Add("@note", OleDbType.LongVarWChar).Value = part.note;
cmd.Parameters.Add("@YYY", OleDbType.Char).Value = part.YYY; // Only for the 2nd query
I have tried/checked the following steps:
1) Checked the type of the used parameter (OleDbType.LongVarWChar), tried also other types without success
2) Updated OLEDB drivers to version 16 x64, and updated connection string to use this driver
3) Created a new .accdb database and imported all tables from the .mdb
4) Tried to modify the first 8 rows in the table tblXXX, inserting more then 255 chars in the db
5) Tried to convert the text format of the Memo field to "RTF" (standard value is "normal text")
But the problem remains, I can insert or update only 255 chars. Can you help me to solve this issue? I have no more tries!
Thanks in advance
Paolo Bozzoli