>> 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.
>
>Perhaps:  SELECT CAST(b AS TEXT) FROM table

Yes, this works well in SQLiteSpy.

>Really I suppose it depends on what SQLiteSpy is using to
>determine that the column type is BLOB.

SQLiteSpy determines the type of each record cell individually, just as it is 
returned by sqlite3_column_type(). So casting a BLOB to text will display it as 
such in SQLiteSpy.

In fact, SQLiteSpy colors the cell backgrounds by data type:

  White:  Text
  Green:  Integer
  Violet: Float
  Blue:   Blob
  Red :   Null

Ralf 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to