Click here to Skip to main content
Rate this: bad
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 26-Mar-12 0:19am
Edited 26-Mar-12 19:53pm

1 solution

Rate this: bad
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:[^]
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 Maciej Los 495
1 Sergey Alexandrovich Kryukov 424
2 OriginalGriff 360
3 Abhinav S 250
4 CHill60 240
0 Sergey Alexandrovich Kryukov 10,102
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

Advertise | Privacy | Mobile
Web01 | 2.8.150327.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