Hello all;
My boss just gave me a weird request - he wants to know if it is possible to insert an Excel file into a BLOB column of an Oracle database. Thus far, I have been playing around with the ADODB stream object:
<vbcode>
Set mStream = New ADODB.Stream
mStream.Type = adTypeBinary
mStream.Open
mStream.LoadFromFile App.Path & "\" & "Book1.xls"
STR = "insert into test_table values(1, " & mStream.Read & ")"
cmdCommand.CommandText = STR
......
</vbcode>
....but when I try to execute the command, I get an invalid character error....I have also tried using the to_lob function from Oracle, but the same error persists...any ideas would be greatly appreciated (please assume all ADO objects are OK - I did not include all the code) THANKS MUCH!!




Reply With Quote