The max total length of a row on MSSQLServer 6.5 is 1738 or so chars
(~8100 on 7.0). If you are inserting into a BLOB (VARCHAR or VARBINARY)
you have to issue a set textsize=(up to 32768 or whatever the max
configured in the SQLServer) statement to tell it the maximum amount you
will transfer at a time. Plus you have to do an insert on the row where
the blob is to be stored and then a select to get the textpointer for
the just inserted row followed by a writetext loop to insert the actual
data. You end up assembling a series of writetext statements with
offsets, lengths, and data in the servers buffer then hit it with an
execute. It is not real clean but we do it all the time in production.
Have been using the same code since 4.21.08. It came out in the
SQLServer programmers toolkit as a VB image insert/read example.