SQLiteBLOB

From Xojo Documentation

(Redirected from SQLiteBlob)

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 EndOfFile Read
EndOfFile Read Write

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:

Var blob As SQLiteBLOB
blob = db.OpenBlob("Team", "Logo", 1, True)
If blob <> Nil Then
Try
Var data As String
While Not blob.EndOfFile
data = data + blob.Read(1000)
Wend
blob.Close
Var mb As MemoryBlock
mb = data
Var logoPic As Picture = Picture.FromData(mb)
Catch error As IOException
MessageBox("Error while reading BLOB: " + error.Message)
End Try
End If

See Also

SQLiteDatabase.CreateBlob, SQLiteDatabase.OpenBlob methods