Как сохранить fr3 в BL
СохранÑÑŽ файл fr3 в БД Firbird 1.5
procedure TForm1.Button1Click(Sender: TObject);
var
memStream:TMemoryStream;
begin
if OpenDialog1.Execute then
try
memStream:=TMemoryStream.Create;
frxReport1.LoadFromFile(OpenDialog1.FileName);
frxReport1.SaveToStream(memStream);
memStream.Position:=0;
IBDataSet1.Edit;
IBDataSet1U_NAME.AsString:=ExtractFileName(OpenDialog1.FileName);
IBDataSet1WWWW.LoadFromStream(memStream);
IBDataSet1.Post;
finally
memStream.Free;
end;
end;
затем пытаюÑÑŒ загрузить его :
procedure TForm1.Button3Click(Sender: TObject);
var
memStream:TMemoryStream;
begin
try
memStream:=TMemoryStream.Create;
IBDataSet1WWWW.SaveToStream(memStream);
memStream.Position:=0;
frxReport1.LoadFromStream(memStream);
frxReport1.ShowReport();
finally
memStream.Free;
end;
end;
и получаю ошибку : Invalid File Format
Поле в БД BLOB SUB_TYPE 0 SEGMENT SIZE 80
что не так делаю?
procedure TForm1.Button1Click(Sender: TObject);
var
memStream:TMemoryStream;
begin
if OpenDialog1.Execute then
try
memStream:=TMemoryStream.Create;
frxReport1.LoadFromFile(OpenDialog1.FileName);
frxReport1.SaveToStream(memStream);
memStream.Position:=0;
IBDataSet1.Edit;
IBDataSet1U_NAME.AsString:=ExtractFileName(OpenDialog1.FileName);
IBDataSet1WWWW.LoadFromStream(memStream);
IBDataSet1.Post;
finally
memStream.Free;
end;
end;
затем пытаюÑÑŒ загрузить его :
procedure TForm1.Button3Click(Sender: TObject);
var
memStream:TMemoryStream;
begin
try
memStream:=TMemoryStream.Create;
IBDataSet1WWWW.SaveToStream(memStream);
memStream.Position:=0;
frxReport1.LoadFromStream(memStream);
frxReport1.ShowReport();
finally
memStream.Free;
end;
end;
и получаю ошибку : Invalid File Format
Поле в БД BLOB SUB_TYPE 0 SEGMENT SIZE 80
что не так делаю?