#401 mORMot 1 » Load/save image » 2010-12-12 20:21:06

array81
Replies: 93

Hi,

I have TSQLRecord with Image property. I need save an image from TImage component to database then I need load it from database and show it on TImage. To save the image I use this function:

var
  ClientRecord: TSQLClientiRecord;
  doc: RawByteString;
  pic: TSynPicture;
  stream: TMemoryStream;
...
...
...

        pic := TSynPicture.Create;
        try
          ImageDoc.Picture.Bitmap.SaveToStream(stream);
          pic.LoadFromStream(stream);
          if not pic.Empty then
            begin
              SaveAsRawByteString(pic,doc,gptJPG,80,300);
              ClientRecord.Documento := doc;
            end
          else
            begin
              ClientRecord.Documento := '';
            end;
        finally
          Pic.Free;
        end;

...
...
...

However I have an error when I try to call  Database.Add(ClientRecord, true)  function.

Can you help me with a fast function to load and save an TImage image?

thanks

#402 mORMot 1 » Complex SQL request » 2010-10-02 12:53:50

array81
Replies: 1

I have understand how retrive data from a table but now I must retrive data with a complex SQL from many tables:

SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
LEFT JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName

Can you explane how can I do it?

#403 Re: mORMot 1 » SQLite3 Framework updated to 1.9.1 - including engine 3.7.2 » 2010-08-27 10:14:20

ab wrote:

I already answered to this particular point in http://synopse.info/forum/viewtopic.php?pid=328#p328

And also to the same question you already posted in http://synopse.info/forum/viewtopic.php?pid=289#p289

So it's my intent to allow VCL usage, in the near future. It won't be difficult, because it's just a matter of change of classes.
But since my last Client wanted a Ribbon look, and the Delphi 2009 integrated component was buggy, I used the one from TMS.

Have you any feedback about the Delphi 2010 ribbon?

Perhaps just using TPageControl and TToolBar could be nice enough. I'll try to do use it.

I don't like Ribbon interface (TMS or Delphi 2010) but this is not a problem. I think your framework shouldn't create the interface. The developer can create the GUI as he want. So the demo should show only how use your framework without create the GUI on runtime.
In my opinion you should create a demo with GUI (on design time) that explane the common functions of your framework. This is only a my opinion but I think this can help me young developer and not only me.

#404 Re: mORMot 1 » SQLite3 Framework updated to 1.9.1 - including engine 3.7.2 » 2010-08-26 16:37:16

OK. I have solve my problem now the demo works. However I don't understant why you need integrated TMS component with your framework. Why don't you create a stand alone framework with a good demo with visual (and common) VCL?

#405 Re: mORMot 1 » SQLite3 Framework updated to 1.9.1 - including engine 3.7.2 » 2010-08-24 12:56:35

I cannot compile the main demo with this new version...

#406 Re: mORMot 1 » SQLite3 Framework 1.8 » 2010-07-28 09:20:25

OK. I understand, so I'm waiting for your demo this friday. Thanks

#407 Re: mORMot 1 » SQLite3 Framework 1.8 » 2010-07-26 17:32:15

This sound good. Do you have a date for it?

Another question why you have used TMS components?

Thanks again.

#408 Re: mORMot 1 » SQLite3 Framework 1.8 » 2010-07-23 10:05:03

This sound good. So I'm waiting your demo until the Administrator won't release an official big demo smile

Thanks

#409 Re: mORMot 1 » SQLite3 Framework 1.8 » 2010-07-23 08:45:38

SQLite3 Framework is powerful but also complex. It is possible add a big demo application that show all the main features (simple and complex features), for example retrive data from database (simple table or complex SQL query), retrieve Image, ... In alternative also many small demo are good (one demo for feature).
I think many people (like me) would use your framework but cannot do it because there is dnot a full demo (full demo is better that documentation if you are not a professional developer).

Do you think this is possible?

Thanks

Board footer

Powered by FluxBB