This is a very simple example:

// create a dummy table
db.SQLExecute("CREATE TABLE images(picture BLOB)")

// insert an image into the BLOB column
Dim rec As New DatabaseRecord
rec.BlobColumn("picture") = GetMyPicture
db.InsertRecord ("images", rec)
db.Commit

where GetMyPicture is:
Sub GetMyPicture() As String
Dim f As FolderItem = GetFolderItem("myimage.jpg")
Dim s As String
Dim b As BinaryStream

b=f.OpenAsBinaryFile(false)
s=b.Read(b.Length)
b.Close

return s
End Sub

Hope this can help you.
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/



On May 28, 2006, at 6:35 AM, Long Huynh wrote:

I look in the example projects downloaded, but could
NOT find an example how to load an image into
REALSQLdatabase table with the field defined as BLOB.

Coud someone send me an example program.

Thanks
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to