BLOB Error

  • Thread starter Thread starter wdewebserver
  • Start date Start date
W

wdewebserver

Hi

Can someone explain why I get an error saving a document with pictures as a
BLOB? I can save Word, Text, RTF, CSV files that don't have any pictures
embedded without any problems.

Any clues or suggestions will be highly appreciated.
 
I am saving the document to a Oracle database using the following code:

using(FileStream fileStream = new FileStream(docPath, FileMode.Open,
FileAccess.Read))

{

byte[] docData = new byte[fileStream.Length];

fileStream.Read(docData, 0, Convert.ToInt32(fileStream.Length));

CSDocumentsDataset.CS_DOCUMENTSRow docRow =
docDataset.CS_DOCUMENTS.NewCS_DOCUMENTSRow();

docRow.APPLICATION_ID = appId;

docRow.DOC_TYPE_ID = docTypeId;

docRow.DOCUMENT = docData;

docRow.CREATED = DateTime.Now.Date;

docRow.CREATED_BY = CS_EMPLOYEE_ID.ToString();

docDataset.CS_DOCUMENTS.AddCS_DOCUMENTSRow(docRow);

}

TIA
 
Back
Top