Krzemo, thank you for the most help I've received on this issue.

I want to be I understand what you are saying beacuse the IMAGE type and SAFEARRAY are unfamiliar to me at present.

If I can try to restate what I think you are saying:

1. I cannot use BSTRs for binary data even if my database table field is varbinary and even though the data in BSTR looks OK in the debugger.

2. My database table field type for the binary data in my BYTE* array should be IMAGE. (Is this true even if there are no more than, say, 30 bytes of encrypted binary data?)

3. There is some way for me to convert my BYTE* array to (and from) an ADO (SAFEARRAY) and it is the SAFEARRAY that I can "put to" and "get from" the database table field.

Do I understand you correctly?

dziękuję

jim