A colleague recently ran into the problem of not being able to write large chunks of data into a text field using SQL Server. This happens because there is an 8k limit on data chunks in SQL Server. For straight ODBC users this isn't that hard to deal with, just send the data in streaming mode. If you use Delphi though, you access ODBC via the BDE based components, and the BDE doesn't do streaming mode. You could, of course, rewrite the application to use ADO for data access, and that shouldn't take more than a few months.
My solution is attached below, in both source and binary form. I wrote a DLL in C++ that uses streaming mode to perform an update on a single field. The end result is a DLL with my class methods exposed via C functions, making it universally accessible.
To compile this you will need the OTL library, and to link the DLL against the system ODBC libraries (odbc32.lib or libodbc32.a, depending on your compiler). If you don't want to deal with the mess you can of course just download datastreamer.dll and datastreamer.pas, which will get you what you need to get going.
| Attachment | Size |
|---|---|
| datastreamer.cpp | 1.13 KB |
| dslib.cpp | 2.57 KB |
| datastreamer.hpp | 1 KB |
| dslib.h | 894 bytes |
| datastreamer.pas | 2.02 KB |
| datastreamer.dll | 668 KB |

![View your cart items []](/sites/all/modules/ecommerce/cart/images/cart_empty.png)
