The following table:
localDB:exec( [[
        CREATE TABLE IF NOT EXISTS soundcache (
        filename TEXT PRIMARY KEY,  -- access path
        ISOtime TEXT, -- time format for If-Modified-Since
        wav BLOB )    -- the content.
        ]] )
The following insert:
stat = localDB:prepare(
            "INSERT OR REPLACE INTO soundcache (filename,ISOtime,wav) "..
            "VALUES (?,?,?)")
        stat:bind(1,filename)
        stat:bind(2,isotime)
        Note("bind="..stat:bind_blob(3,body))
        rc = stat:step()
        if rc == sqlite3.DONE then
            stat:finalize()
            localDB:close()  -- close it
            -- other operations...
        end -- if and so on.
-- retreival:
stat = localDB:prepare(
            "SELECT wav FROM soundcache WHERE filename = ?")  --> returns 0 (sqlite3.OK)
        stat:bind(1,filename)
        stat:step()
        body = stat:get_value(0)

I assume the error is happening with the bind_blob, as the different retreival methods are showing a different, shorter result then the original insert.