ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Can not save.I would like to know the solution.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

monolisa

Republic of Korea
2 Posts

Posted - Mar 12 2013 :  00:19:37  Show Profile  Reply


procedure TForm1.Button1Click(Sender: TObject);
var ms:TMemoryStream;
begin

UniQuery1.SQL.Clear;
UniQuery1.SQL.Add('INSERT INTO MAN_PIC ( Name, MAN_PIC)');
UniQuery1.SQL.ADD('Values ('+QuotedStr(Trim(Edit1.Text))+', :MyPicture'+')' );

ms:=TMemoryStream.Create;
ImageEnVect1.SaveToStreamAll(ms);
ms.Position := 0;
UniQuery1.ParamByName('MyPicture').LoadFromStream(ms,FTBLOB);
ms.Free;

UniQuery1.ExecSQL;

end;


What's the problem?

xequte

39142 Posts

Posted - Mar 12 2013 :  02:39:40  Show Profile  Reply
Hi

What is the error or problem that you encounter?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

monolisa

Republic of Korea
2 Posts

Posted - Mar 12 2013 :  06:14:46  Show Profile  Reply
run query without error, but image will not be saved. What's the problem?

Go to Top of Page

fab

1310 Posts

Posted - Mar 12 2013 :  11:17:17  Show Profile  Reply
Please try to save the memory stream to a file (just after SaveToStreamAll):

ms.SaveTofile('output.all');

Now look at the output.all (check its file size or try to load it using TImageEnVect.LoadFromFileAll()).
This just to check the problem comes actually from ImageEn.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: