| yle="mso-tab-count: 1"> const ULONG cBytes = 4096;
BYTE pWriteData[cBytes]; //从这个数组写入BLOB数据
memset(pWriteData, '', cBytes);
UINT nRead=0;
nRead=fle.Read(pWriteData,cBytes);
while (nRead>0)
{
pMySeqStream->Write(pWriteData,nRead,NULL);
nRead=fle.Read(pWriteData,cBytes);
}
fle.Close();
//一定要执行此句,重设Stream当前位置到它的最开始处
pMySeqStream->ResetPosition();
BLOBSetData.pISeqStream = (ISequentialStream*)pMySeqStream;
BLOBSetData.dwStatus = DBSTATUS_S_OK;
BLOBSetData.dwLength = pMySeqStream->Length();
//将BLOB数据写入到数据库.
&nb
|