[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

How do you import small files as blobs in sqlite?

Hope the zones are right b/c there's not an sqlite forum per-se.  

I'm looking for a simple tutorial or how-to.

I have several small binary files that I want to become part of records in an sqlite database.

filenames:  file1.blob, file2.blob, file3.blob, ...

I want to build an sqlite table that looks like.

time     description      data1        blob
----------------------------------------------------
12-jun    desc               data          file1.blob
21-jun    desc2            data2        file2.blob

How do I accomplish this?  

Thanks!
0
tmonteit
Asked:
tmonteit
  • 3
  • 3
1 Solution
 
tmonteitAuthor Commented:
Also, I would like to use simple command-line interface for the first build of this thing.  An app will later reference this data.  
0
 
tmonteitAuthor Commented:
Good suggestion... unfortunately eatblob.c will not work.  Without a significant OS upgrade my system will not run gcc.  (Long story)

I can run the perlExample.pl  but it doesn't contain the eatblo stuff and I'm not really a perl expert.  Is my only choice to rewrite the eatblob.c in perl or is there a simpler option?

I've also been looking for an eatblob.pl, but can't seem to find one.
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
js-profiCommented:
What compiler/platform you were using? It is not difficult to port the eatblob.c to other OS.
0
 
tmonteitAuthor Commented:
I'm running OS X 10.4   The issue is that gcc is part of Apple's XCode package which right now requires OS X 10.6 (snow leopard).  Since I have an older mac, I was advised that snow leopard would not run on my machine.  So bottom line, the OS upgrade requires a hardware upgrade as well.  I also tried to install gcc using fink, but as I found out it requires the whole XCode package. (Told you it was a long story  :)  )

If I could find a way to run eatblob.c compiled for OS X 10.4 that sounds like the optimal solution.




0
 
js-profiCommented:
don't have a mac. But try to compile it and tell where are the errors. Most of the code - as far as i checked it - could be made portable so that it compiles everywhere.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now