Re: [sqlite] Blob truncation

2008-04-23 Thread Robert Bielik
[EMAIL PROTECTED] skrev: > > Any help is very welcome and thank you in advice! The way I did it was to do a dummy write with a null device that just did: int write(const void * data, int dataLength) { blobLength += dataLength; } Then I used that length with sqlite3_bind_zeroblob and

Re: [sqlite] blob api

2008-04-22 Thread Robert Bielik
Igor Tandetnik skrev: >> Ok, I was kinda hoping for a more "permanent" solution such as: >> >> int sqlite3_cast_column_type(sqlite3* db, const char* zDBname, const >> char* zTable, const char* zColumn, int newColumnType); > > Perhaps > > update tableName set b = cast(b as text); Hah! Of course!

Re: [sqlite] blob api

2008-04-21 Thread Robert Bielik
D. Richard Hipp skrev: > Perhaps: SELECT CAST(b AS TEXT) FROM table > Ok, I was kinda hoping for a more "permanent" solution such as: int sqlite3_cast_column_type(sqlite3* db, const char* zDBname, const char* zTable, const char* zColumn, int newColumnType); that would cast the column into

[sqlite] blob api

2008-04-21 Thread Robert Bielik
Hi all, I'm using the sqlite3_blob_* api to write a larger text stream incrementally. Works a charm, but is there a way to change the datatype of the blob to text afterwards ? I'd like to see the text easily in f.i. SQLiteSpy. TIA /Rob ___

[sqlite] Database from scratch

2006-03-18 Thread Robert Bielik
I'm using the ODBC driver for SQL and I want to create a SQLite 3 db from scratch, i.e. open a transaction, use DDL to create tables and inserts to insert data into the tables, then commit. It seems to work (i.e. a file is created and it has a reasonable size). However, when trying to open the

[sqlite] Writing/reading blobs

2006-01-22 Thread Robert Bielik
Hi all, I'm using SQLite3 via the SQLite ODBC wrapper. Amongst other things I need to store large blobs. When using ODBC this means several calls to SQLPutData/SQLGetData. I've read the docs and it seems that SQLite doesn't support this. Is this in planning, and/or can someone well versed in

Re: [sqlite] Writing/reading blobs

2006-01-22 Thread Robert Bielik
iginal Message- From: Robert Bielik [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 8:17 AM To: sqlite-users@sqlite.org Subject: [sqlite] Writing/reading blobs Hi all, I'm using SQLite3 via the SQLite ODBC wrapper. Amongst other things I need to store large blobs. When using ODBC this

[sqlite] Writing/reading blobs

2006-01-22 Thread Robert Bielik
Hi all, I'm using SQLite3 via the SQLite ODBC wrapper. Amongst other things I need to store large blobs. When using ODBC this means several calls to SQLPutData/SQLGetData. I've read the docs and it seems that SQLite doesn't support this. Is this in planning, and/or can someone well versed in