DatabaseRecord.BlobColumn

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

DatabaseRecord.BlobColumn(Name As String) As String

Supported for all project types and targets.

Gets the blob value for the specified field. The parameter is the column name. Use BLOB columns to work with binary data such as pictures or files.


Method

DatabaseRecord.BlobColumn(Name As String, Assigns value As String)

Supported for all project types and targets.

Sets the specified field to the specified BLOB. The parameter is the column name. Use BLOB columns to work with binary data such as pictures or files.

Sample Code

Creates a new row in the team table:

Dim row As New DatabaseRecord

row.Column("Name") = "Penguins"
row.Column("Coach") = "Mary Smith"
row.Column("City") = "Boston"
row.BlobColumn("Logo") = Canvas1.Backdrop.GetData(Picture.FormatPNG)

myDB.InsertRecord("Team", row)

If myDB.Error Then
MsgBox("DB Error: " + myDB.ErrorMessage)
End If