I cant insert bmp file to blob column in oracle database from delphi.

What version of Delphi? For D6 you can use BLOB streams:

Saving:

procedure TDeliveryInstructionsFm.ButtonUploadClick(Sender: TObject);
Var
  FileName: String;
  Stream1: TFileStream;
  Stream2: TStream;
begin
  if OpenDialog1.Execute then
  begin
    FileName := OpenDialog1.FileName;

    if FileExists(FileName) then
    begin
      PostAdo.Edit;
      Stream1 := TFileStream.Create(FileName, fmOpenRead);

      Stream2 := PostAdo.CreateBlobStream(PostAdoAtlDelivery, bmWrite);

      Stream2.CopyFrom(Stream1, Stream1.Size);
      FreeAndNil(Stream1);
      FreeAndNil(Stream2);
      PostAdo.Post;
      DeliveryAdo.Close;
      DeliveryAdo.Open;
    end else
      MessageDlg('File not found.', mtError, [mbOk], 0);
  end;
end;

You can reverse the streams in the above code to retrieve the image and save it to disk.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.