23-01-2023, Saat: 14:31
Android uygulaması yapıyorum Resim ImageControl1'e resim yükleyebiliyorum onu mysql veritabanıma aktarmaya çalışıyorum bu kodu yazdım yalnız ftblob undeclared identifier hatası veriyor yanlış mı yazıyorum daha sade bir kod mevcut mudur ?
procedure TForm2.Button2Click(Sender: TObject);
var
BlobStream: tStream;
Surf: TBitmapSurface;
begin
if ImageControl1 <> nil then
begin
Surf := TBitmapSurface.Create;
Surf.Assign(ImageControl1.Bitmap);
BlobStream := TMemoryStream.Create;
if not TBitmapCodecManager.SaveToStream(BlobStream, Surf, '.jpg') then
raise EBitmapSavingFailed.Create('No');
BlobStream.Position := 0;
Form3.UniQuery1.ParamByName('pic').LoadFromStream(BlobStream,ftblob);
Form3.UniQuery1.ExecSQL;
Surf.Free;
end;
Form3.Show;
end;

