I need to save a pdf file to a mysql blob field, the file could be anywhere, hard disk, CD, network, etc.
what I can do with pictures, but now they occurred it was better a PDF
thanks for your attention
Someone saved a pdf file into a mysql blob field
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Someone saved a pdf file into a mysql blob field
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Someone saved a pdf file into a mysql blob field
Yes rathi but my blob field is empty, with images works fine
tnx
tnx
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Someone saved a pdf file into a mysql blob field
Had you tried load_file() mysql function?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Someone saved a pdf file into a mysql blob field
When I ran the following queries it worked.
For saving pdf file into blob col
For saving pdf file from blob col
For saving pdf file into blob col
Code: Select all
insert into test1 ( pdf_col ) values ( load_file( 'd:/sample.pdf' ) )
Code: Select all
select pdf_col from test1 INTO DUMPFILE 'd:/samplecopy.pdf'
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Someone saved a pdf file into a mysql blob field
I've seen it, but the client does not have access to the server and to use the load_file must be the file on the server
continue to seek a solution
in php you add "/" to load a pdf file
regrads
continue to seek a solution
in php you add "/" to load a pdf file
regrads
Re: Someone saved a pdf file into a mysql blob field
My partner find the solution for save a pdf into blob field
my partner found the solution to save a pdf on a blob field
you just have to base64 encode and save pdf
cbuff:=hb_base64encode(cbuff)
and to write the pdf
hb_base64decode(oRow:fieldGet("contenido"))
I hope this is useful
Regrads
my partner found the solution to save a pdf on a blob field
you just have to base64 encode and save pdf
cbuff:=hb_base64encode(cbuff)
and to write the pdf
hb_base64decode(oRow:fieldGet("contenido"))
I hope this is useful
Regrads
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Someone saved a pdf file into a mysql blob field
Thanks a lot for that.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.