Re: [sqlite] How to insert the BLOB in database?

2019-06-11 Thread FarSight Data Systems
Thank you. Mark On Monday, June 10, 2019 12:53:29 PM Luuk wrote: > On 10-6-2019 05:08, Mark Halegua wrote: > > On Monday, June 10, 2019 03:46:02 AM Simon Slavin wrote: > >> On 10 Jun 2019, at 3:44am, Mark Halegua wrote: > >>> I probably should figure this out, but in a GUI, how do I recover a

Re: [sqlite] How to insert the BLOB in database?

2019-06-10 Thread Luuk
On 10-6-2019 05:08, Mark Halegua wrote: On Monday, June 10, 2019 03:46:02 AM Simon Slavin wrote: On 10 Jun 2019, at 3:44am, Mark Halegua wrote: I probably should figure this out, but in a GUI, how do I recover a graphic from the database? Programming. SQLite can't do it since it doesn't

Re: [sqlite] How to insert the BLOB in database?

2019-06-09 Thread Simon Slavin
On 10 Jun 2019, at 4:08am, Mark Halegua wrote: > I'm using Python. What would the programming sequence be to display the > graphic in that language? It's not a SQlite question. SQLite doesn't understand graphics. You'd do it similar to how you'd display a graphic you'd read from a file.

Re: [sqlite] How to insert the BLOB in database?

2019-06-09 Thread Mark Halegua
On Monday, June 10, 2019 03:46:02 AM Simon Slavin wrote: > On 10 Jun 2019, at 3:44am, Mark Halegua wrote: > > I probably should figure this out, but in a GUI, how do I recover a > > graphic from the database? > Programming. SQLite can't do it since it doesn't even understand that that > sequence

Re: [sqlite] How to insert the BLOB in database?

2019-06-09 Thread Simon Slavin
On 10 Jun 2019, at 3:44am, Mark Halegua wrote: > I probably should figure this out, but in a GUI, how do I recover a graphic > from the database? Programming. SQLite can't do it since it doesn't even understand that that sequence of octets is a graphics. How you do it in programming depends

Re: [sqlite] How to insert the BLOB in database?

2019-06-09 Thread Mark Halegua
On Sunday, June 09, 2019 08:24:10 PM Richard Hipp wrote: > On 6/9/19, Igor Korot wrote: > > Now I open this database in sqlite3 CLI binary and would like to insert > > some png > > file inside this BLOB field. > > INSERT INTO tab1(blob1) VALUES(readfile('some.png')); I probably should figure

Re: [sqlite] How to insert the BLOB in database?

2019-06-09 Thread Simon Slavin
On 9 Jun 2019, at 2:24pm, Igor Korot wrote: >> INSERT INTO tab1(blob1) VALUES(readfile('some.png')); > > I presume the file extension can be anything? As you presume, the SQLite extension does not understand the contents of the file. It's treated just as a sequence of octets. So you can use

Re: [sqlite] How to insert the BLOB in database?

2019-06-09 Thread Igor Korot
Hi, Richard, Thank you for the reply. On Sun, Jun 9, 2019 at 7:24 PM Richard Hipp wrote: > > On 6/9/19, Igor Korot wrote: > > > > Now I open this database in sqlite3 CLI binary and would like to insert some > > png > > file inside this BLOB field. > > > INSERT INTO tab1(blob1)

Re: [sqlite] How to insert the BLOB in database?

2019-06-09 Thread Richard Hipp
On 6/9/19, Igor Korot wrote: > > Now I open this database in sqlite3 CLI binary and would like to insert some > png > file inside this BLOB field. INSERT INTO tab1(blob1) VALUES(readfile('some.png')); -- D. Richard Hipp d...@sqlite.org ___

[sqlite] How to insert the BLOB in database?

2019-06-09 Thread Igor Korot
Hi, ALL, Let's say I have some database, where I have table called test. This test table contains the field whose type is BLOB. Now I open this database in sqlite3 CLI binary and would like to insert some png file inside this BLOB field. And I am not talking about the file name - the actual