Click here to Skip to main content
16,005,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

I need to upload a textfile(.txt) to sqlite as a BLOB and retrieve that file when i click a link for example attachment1.txt in my flex AIR desktop project.

I upload image as BLOB using pngencoder and base64encoder to store to sqlite and retrive back using base64decoder. it's works fine . but need to upload a textfile in local sqlite , how can i do this?, need help urgent

advance thanks
Posted
Updated 26-Mar-12 18:53pm
v3

1 solution

There is a difference between those 2 formats, you should be aware of that.

You should use a generalized approach and store all those files as files and not as special types. So you can use a BLOB for all of them, storing them as binary data.

Blog entry explaining:
http://mornie.org/blog/2007/01/10/Storing-binary-data-in-SQLite/[^]
 
Share this answer
 
Comments
Ram Sam 2 27-Mar-12 0:55am    
thanks,can u post code to store and retrive only txt file in sqlite database in flex air application.
TorstenH. 27-Mar-12 11:57am    
check this: simple example code

and please do a little search on Goole, there are a lot of examples around.

I can also recommend to buy a book about Flex/AIR development, the topic is covered in almost all of them. A book does have the advantage of revealing it's secrets without knowing keywords...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900