SaveBitmap
This command will save the byte array of a bitmap picture directly to a database. The record in the database must already exist.
Note: An alternative way to save is SigToImg.
Group: Database Related Extensions
Syntax:
[bValue =] DB.SaveBitmap(sTable, sField, bData, [vWhere])
bValue (Boolean) Optional – indicates success or failure
sTable (String) is the name of the table in the database
sField (String) is the field name within the table
bData (Byte) is the byte array containing the image
vWhere (Variant) Optional – a SQL parameter that updates or inserts the image to a specific record
Example:
Dim bVal as Boolean
Dim bImage() as Byte
Dim nSize As Long
Open "C:\MyPic.bmp" For Binary Access Read As #1
nSize = LOF(1)
ReDim bImage(nSize - 1)
Get #1, , bImage
Close #1
'
bVal = DB.SaveBitmap("Images", "Image", bImage, "PartNo='100620'")