SQLiteBlob

From Xojo Documentation

Class (inherits from Object)

Provides a way for you to incrementally read and write to BLOB columns in SQLite databases. (SQLiteDatabase).

Properties
Length fa-lock-32.png Position


Methods
Close Read Write
EOF ReadError WriteError

Notes

Implements Readable and Writeable interfaces.

Examples

This example reads the Logo (stored as a binary picture) from the Logo column for rowID = 1 in the Team table:

Dim blob As SQLiteBlob
blob = db.OpenBlob("Team", "Logo", 1, True)
If blob <> Nil Then
Dim data As String
While Not blob.EOF
data = data + blob.Read(1000)
If blob.ReadError Then
MsgBox("Error reading from BLOB.")
Exit While
End If
Wend
blob.Close
Dim mb As MemoryBlock
mb = data
Dim logoPic As Picture = Picture.FromData(mb)
End If

See Also

SQLiteDatabase.CreateBlob, SQLiteDatabase.OpenBlob methods