BYTE* array to BSTR
There is some kind of missunderstanding
BYTE * array can be placed in BSTR if it is a string in it (not a binary data)

If U want to fallow BYTE* => to BSTR => "TEXT" pattern than U should encode that string to supported code base (alter it to HEX string for example). U cannot store binary data in TEXT column since database validates if all character from BSTR are valid in selected character encoding scheme.

If U want to store binary data than U should use IMAGE type database column (or parameter).Than using BSTR is not supported. U should pass variant of type Array to ADO (SAFEARRAY).

ANd to process large data (TEXT and IMAGE) in VS6 u have to access them in the special way.
See example from microsoft:
Code:
 
_bstr_t varChunk;
_bstr_t varNotes;
long lngTotalsize,
lngOffSet = 0,
lngChunkSize = 100; 
lngTotalsize = g_pRS->Fields->Item["Notes"]->ActualSize / 2 ; //Becuase of being WChar
if (lngTotalsize <= 0) return;

while (lngOffSet < lngTotalsize)
{
 varChunk = g_pRS->Fields->Item["Notes"]->GetChunk(lngChunkSize);
 varNotes = varNotes + varChunk;
 lngOffSet = lngOffSet + lngChunkSize;
}
SetDlgItemText (g_hDlg2Wnd, IDC_NOTES, varNotes);
HTH,
Krzemo.