add Image in SQLite Browser to cell (BLOB) and open in Android

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear friends, please very much for your help.

I know that my question can be dumb question, but answer me please...

I have SQLite Browser.
I have table with BLOB column
When I click in SQLite on IMPORT button - I can choose only *.txt format of file or *.* all files. So I choose "all files" and I add "picture.jpg" to my DB in *.txt format. For example the data of picture looks similar as:

˙Ř˙ŕ JFIF d d ˙ě Ducky P ˙î Adobe dŔ ˙Ű „ łT%F7G !1 AQ a"2B q ‚C‘ˇÁ#3ƒ“ѱb˙Ú ? ĺĆW6y%Čą}ܸ˝›ĆË Qco9”41°xĘ Ş¤hËđ


when I want open this picture via my program or via SQLite Viewer 1.0 (I have read SQL tutorial), then I get message:
Error fetching bitmap: Error loading bitmap


Please ...the mistake I think is in adding of picture to DB. How can I do it in SQLite? Is somewhere tutorial for it? What I am doing bad?
Thank you and have a good day

Please very much is here anybody for help me with this basic....realy I dont know....
 
Last edited:

petr4ppc

Well-Known Member
Licensed User
Longtime User
Excuse me please, I cant find some tutorial on the web, how can I in SQLite add an image to database to BLOB field, is it possible please? :sign0013:

Please very much for understanding me, I have read SQL tutorial, I have read SQLite documentation but I cant find it....
Thank you
 
Last edited:
Upvote 0

fatman

Active Member
Licensed User
Longtime User
Hi petr4ppc,

I don´t know if it is a good idea storing pictures in databases... I always store the path in the database keeping the database as small as possible.

Fatman
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear FATMAN,

thank you very much for your answer, because I am sitting over this trouble second day and I belive that it is very simple....It is very nice and interresting advice and I can realize your advice now, it is simple and smartexample....

BUT

I cant add image to database in SQLite Browser....SQLite browser allow add only *.txt format of files...I dont know how to add image as file to database via SQLite Browser :BangHead:

this make me sad...I belive that it must be easy :BangHead:

please for advice how can I do this....
Best regards
p4ppc

DEAR Erel....thank you for your answer...I have read all examples SQL, I am writing here after reading tutorials and examples....but there is not written how to add image in SQLite Studio.....no via andorid code but in real SQLite studio....I cant find it.
Yes..I know that you have written often in forum, that we must have all OK in writting side, that we must have temporary file....but this is for example when we want add image to database via basic4ppc code

Thank you and best regards
p4ppc
 
Last edited:
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
EREL
Do not apologize, you are doing all for us. Thank you
FATMAN
Thank you very much for your advices, I will try addon in firefox and in second example I use your advice with URL to picture in database

I give up add image to DB in real SW SQLite :sign0148:

THANK YOU
BEST REGARDS
p4ppc
 
Upvote 0
Top