How do you think, if I save PDF file to Blob field in MySql?

How do you think, if I save PDF file to Blob field in MySql?

Postby dutch » Tue Aug 22, 2017 9:10 am

Dear All,

I have step to save receipt in PDF file format. If I save to Mediumblob field in MySql.
1. Is it stable to extract and re-use PDF file?
2. Does it make load time longer, when we fetch data of this table?

Thanks for any idea and suggestion.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How do you think, if I save PDF file to Blob field in MySql?

Postby cnavarro » Tue Aug 22, 2017 9:51 am

dutch wrote:Dear All,

I have step to save receipt in PDF file format. If I save to Mediumblob field in MySql.
1. Is it stable to extract and re-use PDF file?
2. Does it make load time longer, when we fetch data of this table?

Thanks for any idea and suggestion.


If you have doubts, use to save another table related to the same key field as the main table
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6498
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How do you think, if I save PDF file to Blob field in MySql?

Postby Armando » Tue Aug 22, 2017 2:17 pm

Dutch:

Cristobal's advice is a great option, my experience

1.- Is it stable ?, Yes, of course it is very stable.
2.- Yes, it takes more time to load the records

an other options are

Tinyblob
Blob
MeniumBlob
LongBlob

Best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3049
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: How do you think, if I save PDF file to Blob field in MySql?

Postby dutch » Wed Aug 23, 2017 12:33 am

Thanks Narvarro and Armando,

I have another question, how to preview PDF in Mediumblob field in MySql?
Does the XIMAGE support PDF preview?

I read many post in forum, but it is no success case to preview PDF object?

Thanks in advance for any idea or suggestion.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How do you think, if I save PDF file to Blob field in MySql?

Postby cnavarro » Wed Aug 23, 2017 1:11 am

Dutch, some options:

1) For only preview first page of pdf document

viewtopic.php?f=6&t=32550&p=191290&hilit=Reader+Acrobat#p191378

2) With an external application

viewtopic.php?f=6&t=32550&p=191295&hilit=sumatra#p191296

3) With ActiveX ( search "AcroPDF.PDF.1" )

Code: Select all  Expand view

REDEFINE ACTIVEX oActiveX ID 800 OF oDlg PROGID "AcroPDF.PDF.1"

// Or DEFINE ACTIVEX ...
 


viewtopic.php?f=6&t=28148&hilit=Reader+Acrobat#p157419

3) Other solution ( please read all topic )

viewtopic.php?f=6&t=33439#p197146
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6498
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: How do you think, if I save PDF file to Blob field in MySql?

Postby dutch » Wed Aug 23, 2017 2:21 am

Dear Navarro,
Thank you so much for your suggestion.
RICHTEDIT5 and ACTIVEX is working well for a PDF FILE. How to preview PDF data from a field (blob, MySql)?

Thanks in advance.
cnavarro wrote:Dutch, some options:

1) For only preview first page of pdf document

viewtopic.php?f=6&t=32550&p=191290&hilit=Reader+Acrobat#p191378

2) With an external application

viewtopic.php?f=6&t=32550&p=191295&hilit=sumatra#p191296

3) With ActiveX ( search "AcroPDF.PDF.1" )

Code: Select all  Expand view

REDEFINE ACTIVEX oActiveX ID 800 OF oDlg PROGID "AcroPDF.PDF.1"

// Or DEFINE ACTIVEX ...
 


viewtopic.php?f=6&t=28148&hilit=Reader+Acrobat#p157419

3) Other solution ( please read all topic )

viewtopic.php?f=6&t=33439#p197146
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 10 guests