The problem lies with the way in which the ODBC driver handles strings, if you try to write a string to a field which is longer than any of the strings already in the field, you get the 'Invlaid buffer....' message. Just set the 'Don't optimize column width' option on the driver.
Evan after doing this, I still had to use two connection objects, one for upload and one for download. The download connection did not have the 'optimize column width' option set, as it seemed to corrupt the data.
Hope this helps, if you still can't master it then let me know, and I'll post the code.