 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Erkan KURTULUŞ Guest
|
Posted: Mon Jun 14, 2004 3:27 pm Post subject: How can i store a excel file as stream in DB |
|
|
Hi Everyboy,
i have a problem. i would like store excel file as stream in DB. However
i can't do it. Altough i stored excel file in DB, i can't read it next
step. Following my source code.
var
Ms: TMemoryStream;
Fs: TFileStream;
begin
Ms := TMemoryStream.Create;
Ms.LoadFromFile('Sample.xls');
adodTemplate.Append;
adodTemplateData.LoadFromStream(Ms);
adodTemplate.Post;
Fs := TFileStream.Create('SampleNext.xls', fmCreate);
adodTemplateData.SaveToStream(Fs);
FreeAndNil(Ms);
FreeAndNil(Fs);
end;
'SampleNext.xls' couldn't be opened with Excel. And these files' size
are diffrent.
Thanks...
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|