if opendialog1.Execute thenbeginADOQuery1.Close;ADOQuery1.SQL.Text:='select pic from text where ccc = ''' + trim(Edit1.Text) +'''';ADOQuery1.open;(ADOQuery1.Fields[0] as TBlobField).SaveToFile('d:\\photo\\aaa,jpg');