function TWebModule1.getDBResponse:string;
var
MyADOConnection : TADOConnection;
MyAdoQuery : TADOQuery;
NewGUID:TGUID;
myZipFile: TZipFile;
bs: TStream;
contentStream: TMemorystream;
begin
CoInitializeEx(nil,COINIT_MULTITHREADED);
MyADOConnection := TADOConnection.Create(nil);
MyADOConnection.ConnectionString :='bla';
MyAdoQuery := TADOQuery.Create(nil);
MyAdoQuery.Connection := MyADOConnection;
MyADOConnection.Connected := true;
myZipFile := TZipFile.Create;
CreateGUID(NewGUID);
myZipFile.Open('C:\temp\'+GUIDToString(NewGUID)+'.zip');
MyADOQuery.SQL.Text := 'SELECT bla bla';
MyADOQuery.Open;
while not MyADOQuery.Eof do Begin
bs := MyADOQuery.CreateBlobStream(MyADOQuery.Fields[0], bmRead);
contentStream.CopyFrom(bs, bs.Size);
bs.Free;
contentStream.Position:=0;
MyZipFile.Add(contentStream, generateFileName), zcDeflate);
end;
ms.Free;
MyZipFile.Close;
MyZipFile.Free;
Result:= '';//
URL zum zipfile
end;
function TWebModule1.generateFileName:string;
begin
Result:='';//erzeugt einen eindeutigen Filename
end;
function TWebModule1.getNormResponse:string;
begin
Result:='Hallo';
end;