Hello sandhya,

I use SQLite DB's with JPG and PNG files in them. I create a MD5 hash
of the file before insertion and use the hash as the primary key in
both the information table (about the files) and the blob table that
contains the files themselves. If you have a file on disk and do the
hash, it's easy to search for matching files in the DB. I have indexes
on the filenames for faster searching by filename.

Insertion and retrieval's easy if you use the parameterized SQL,
prepare statement and step.

If you want an API, just write one around the SQL. That's what I've
done anyway.

C

Monday, July 24, 2006, 6:11:31 AM, you wrote:

s>  Hi,
s>     Can anybody help me.
s>  Is there any possibility to import files from the local file system and
s> storing in sqlite DB.And Is there any export option just to check whether
s>  the loaded file into a table consists of same data as the original file or
s> not.
s>  Like,  Is there any API which accepts a file name given and load into DB or
s> we
s>  have to do it ....i mean getting the length of the file to load into DB and
s> at the DB side how we should do this.
s>  How it will store in DB?Any ObjID  it will give or how it get stored in
s> Table?
s>  Any one pls help me.....Handling files like .jpg,.gif,.txt,.asp,.gz what
s> ever may be the file i have to load it into my DB and can able to access it
s>  through a program?
s>  How Sqlite handlings storing files in database.Please...I am very new to
s> this DB.Please help me in giving some information about this.
s>  I am in very need of this.

s>  Thank you for all,

s>  -Sandhya

>> ----- Original Message ----- 
>> From: "Tom Njagi" <[EMAIL PROTECTED]>
>> To: <sqlite-users@sqlite.org>
>> Sent: Saturday, July 22, 2006 7:20 PM
>> Subject: Re: [sqlite] import in sqlite
>>
>>
>> > sandhya wrote:
>> > >  Hi,
>> > >
>> > >  Is there any possibility to import files from the local file system
s> and
>> > > storing in
>> > >  sqlite DB.And Is there any export option just to check whether
>> > >  the loaded file into a table consists of same data as the original
s> file
>> or
>> > > not.
>> > >  Is it possible in sqlite?
>> > >  If possible,How it will stores files in tables?In which format?
>> > >  Please explain me how can i do it.
>> > >
>> > >  Thank you
>> > >  Sandhya
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > Yes there is.
>> >
>> > I used Sqlite database browser to import from local file system. The
>> > files I imported were of csv kind.
>>





-- 
Best regards,
 Teg                            mailto:[EMAIL PROTECTED]

Reply via email to