You are not logged in.
Pages: 1
In my application I generate PDF with TPdfDocumentGDI. Must be saved in a BLOB field in my database.
I used like this:
v_pdf: TPdfDocumentGDI;
v_pdfstream: = TMemoryStream.Create;
v_pdf.SaveToStream (v_pdfstream);
v_pdfstream.Position: = 0;
fdQuery.ParamByName ('REQUESTPAGE_PAGES') LoadFromStream (apages, Data.DB.ftBlob).;
How can I do this with mORMot?
I'm trying so, but does not work:
v_pdf: TPdfDocumentGDI;
v_pdfstream: = TMemoryStream.Create;
v_pdf.SaveToStream (v_pdfstream);
v_pdfstream.Position: = 0;
v_prep: Props.NewThreadSafeStatementPrepared = ('INSERT INTO CPU_REQUESTPAGE' +
'(REQUESTPAGE_PAGES)' +
'VALUES (?)'
False);
v_prep.BindBlob (1, pointer (v_pdfstream), v_pdfstream.Size);
v_prep.ExecutePrepared;
Offline
Pages: 1