Click here to Skip to main content
11,706,979 members (53,701 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Sqlite Flex
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 25-Mar-12 23:19pm
Edited 26-Mar-12 18:53pm
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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/[^]
  Permalink  
Comments
Ram Sam 2 at 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. at 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
0 Sergey Alexandrovich Kryukov 140
1 OriginalGriff 125
2 chainerlt 110
3 ppolymorphe 99
4 Mika Wendelius 70
0 OriginalGriff 9,178
1 Sergey Alexandrovich Kryukov 8,487
2 CPallini 5,189
3 Maciej Los 4,766
4 Mika Wendelius 3,696


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 27 Mar 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100