I barely understand what I need to do myself, so if you need clarification, let me know.
Here's the relevant code from a Sub I'm working in (in Visual Studio Pro 2005):
The mailAtmtName, filePath and atmtFile variables are used later in the Sub in a SQL INSERT statement to write to a SQL 2000 table. The atmtFile is saved to a column as image datatype. Not an image like .jpg, but the datatype - big difference!
My supervisor informed me that to allow users elsewhere in the company to use the Access module they work in to view the file, it needs to be converted to OLE prior to putting it in the table.
My question: Can anyone tell me how to convert the file to OLE in VB.NET?
Please don't give me advice on how I should really not convert to OLE - it's not my decision. I'm just the poor soul who has to figure out how to do it!
Thanks!
Here's the relevant code from a Sub I'm working in (in Visual Studio Pro 2005):
VB.NET:
Dim mailAtmtName As String
mailAtmtName = redempMailItem.Attachments.Item(atmtCounter).FileName
Dim filePath As String
filePath = ("Y:\Attachments_Test\TempProcessing\" & redempMailItem.Attachments.Item(atmtCounter).FileName.ToString)
Dim atmtFileStream As New FileStream("y:\attachments_test\TempProcessing\" & mailAtmtName, FileMode.Open, FileAccess.Read)
Dim atmtFile(atmtFileStream.Length) As Byte
atmtFileStream.Read(atmtFile, 0, atmtFileStream.Length)
atmtFileStream.Close()
The mailAtmtName, filePath and atmtFile variables are used later in the Sub in a SQL INSERT statement to write to a SQL 2000 table. The atmtFile is saved to a column as image datatype. Not an image like .jpg, but the datatype - big difference!
My supervisor informed me that to allow users elsewhere in the company to use the Access module they work in to view the file, it needs to be converted to OLE prior to putting it in the table.
My question: Can anyone tell me how to convert the file to OLE in VB.NET?
Please don't give me advice on how I should really not convert to OLE - it's not my decision. I'm just the poor soul who has to figure out how to do it!
Thanks!