procedure save_jpg(Sender:TObject); //JPG图片存到oracle中var pic:Tfilestream; begin pic:=TFileStream.Create('c:/1.jpg',fmOpenRead); adoquery.close; adoquery.sql.text:='select xh,img from table'; adoquery.open; adoquery.append; adoquery.fieldbyname('xh').asinteger:=1; TBlobfield(adoquery.fieldbyname('img')).loadfromstream(pic); adoquery.post; pic.Free; end; procedure read_jpg(Sender: TObject); //从oracle中读取JPG图片 begin adoquery.close; adoquery.sql.text:='select xh,img from table'; adoquery.open; TBlobfield(adoquery.fieldbyname('img')).savetofile('c:/1.jpg'); image1.loadfromfile('c:/1.jpg'); end;