Check out these samples with TAdoQuery .
Loading data directly from a file
ADOQuery1.Parameters.AddParameter.Name:='Param1'; ADOQuery1.Parameters.ParamByName('Param1').LoadFromFile('yourfilename',ftBlob); ADOQuery1.SQL.Add('INSERT INTO TableName (FieldName) VALUES (:Param1)'); ADoQuery1.ExecSQL;
using Stream to load data
ADOQuery1.Parameters.AddParameter.Name:='Param1'; ADOQuery1.Parameters.ParamByName('Param1').LoadFromStream(AStream,ftBlob); ADOQuery1.SQL.Add('INSERT INTO TableName (FieldName) VALUES (:Param1)'); ADoQuery1.ExecSQL;
You should know that the Microsoft Oracle oledb driver not compatible with blob fields instead of using the Oracle OLEDB provider .
As a final tip, if you can, try using other components to connect to ORACLE, such as dbexpress, ANYDAC or ODAC components
source share