hello;

I'm working on a web application that uses a locally stored gears/
sqlite database as the input unit.  So people who want to use this
site would create a gears/sqlite database created according to a
publicly available protocol ("schema"?) and then when they fired up
the site and they can use all the doo-dads that we built into the site
to analyze their information.  It it important that all of the data be
local an none on our server because the nature of the user is that
they would not want to share this information.  Anyone who wants to
share would simply ship the database to whomever.  Hopefully that is
not over-sharing, but may make it clear why I am trying to do what I
am trying to do and running into trouble.

So I used a firefox extension (SQLite Manager) to build a gears-ready
database.  one of the tables includes map images (.jpg).  The field in
the table that receives the binary data is defined as a blob, so I
have to assume that this data is in fact a blob.  Now what I need to
do is be able to extract this blob from the gears database and display
it in an <img>.  I thought this was pretty simple, but has turned out
not to be.

var db = google.gears.factory.create('beta.database');
db.open('test');
var rs = db.execute("SELECT * FROM maps");
while (rs.isValidRow())
        {
        var description = rs.field(0);
        //we do something here with the description of the map
**      var data = rs.field(1);
        document.getElementById('mapGoesHere').src = data;
        rs.next()
        }
rs.close();

So I'm getting an 'unsupported data type' at **, and I have tried most
every combination of httprequest to localserver to desktop to canvas
method to try and access this blob data.  Also, I'm not an engineer by
training, so consider me an amateur (while not a novice).  Any
guidance or code samples or liquor would be appreciated.

Reply via email to