stored procedure save blob type field to file ?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
osmantaskiran
Posts: 15
Joined: Thu 21 Apr 2005 22:02

stored procedure save blob type field to file ?

Post by osmantaskiran » Fri 26 Feb 2010 12:42

hi; I m using Codegear 2010 and SDAC component on SQL Server 2008 I inserted my file to sql server table with stored proc.
I need to retrieve my blob file to local filesystem with stored proc How can I do it?
I can't find savetofile procedure in storedproc component in dynamically, please help me?

Falcon
Devart Team
Posts: 19
Joined: Tue 02 Feb 2010 10:40

Post by Falcon » Mon 01 Mar 2010 14:14

To save BLOB field to file use the code like this

Code: Select all

var
  BlobField: TBlobField;
begin
  MSStoredProc.ExecProc;
  BlobField := MSStoredProc.FieldByName(ImageField) as TBlobField;
  BlobField.SaveToFile(Filename);
end;

osmantaskiran
Posts: 15
Joined: Thu 21 Apr 2005 22:02

Post by osmantaskiran » Mon 01 Mar 2010 14:15

thanks

Post Reply