SQLite Forum

length function for BLOB out of sync with documentation
Login
You will have to read the documentation for the wrapper (unixodbc) and see how you pass in a "binary" object.  Or perhaps easier, use the sqlite3 CLI to create a database with a table and put a blob in it, select from it, and see what you get -- I would expect that the datatype would be bidirectional.

```
create table x(x);
insert into x values (x'0123456789');
select typeof(x), x from x;
-- blob|#Eg?
```

For example, python2+sqlite3/python2+apsw wrapper "blobs" go back and forth as "buffer" objects.  python3+sqlite3/python3+apsw "blobs" go back and forth as byte strings (or can be sent as objects conforming to the buffer protocol).

In the IBM DB2 CLI (which became ODBC) this would be one of the `SQL_BINARY` types, not an `SQL_CHAR` type.  `SQL_CHAR` types being text.  Can't help more as I haven't actually used the DB2 CLI for a long time ...