Image Fields with SQL Server 6.5

I need to save and load binary files to/from an image field.
I'm using SQL 6.5 trought ODBC.

I' ve tried it using the following code:

a)  cast


b) using  the Tips from borland: "Save and load Metafiles in a BLOB field
    without using DBImage"

but in both get the error message: "invalid BLOB length".

any suggestions ???

thanks in advance....

    Marcelo Becerra G.