PdcDBTable.PutImage: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Declaration == PutImage(FieldName as String,FileName as String) as Boolean == Description == Puts an image from disk into the database, returns true or false wether the pr..." |
No edit summary |
||
Line 18: | Line 18: | ||
if IsValid(objTable) then | if IsValid(objTable) then | ||
if objTable.Locate("DO_ORDNR", "00001") then | if objTable.Locate("DO_ORDNR", "00001") then | ||
filename = "C:.jpg" | filename = "C:\temp\filename.jpg" | ||
if objTable.EditRecord then | if objTable.EditRecord then | ||
objTable.PutImage "DO_IMAGE", filename | objTable.PutImage "DO_IMAGE", filename |
Revision as of 05:55, 4 October 2013
Declaration
PutImage(FieldName as String,FileName as String) as Boolean
Description
Puts an image from disk into the database, returns true or false wether the process has succeeded
Notes
This method makes it possible to store images in the database. The image is taken from the given location and stored as a blob file in the table.
Code example
This code example store the image from disk in the table.
Dim objTable
dim filename
Set objTable = pdc.Database.OpenTable(pdcConData, "DO_CALC","DO_ORDNR")
if IsValid(objTable) then
if objTable.Locate("DO_ORDNR", "00001") then
filename = "C:\temp\filename.jpg"
if objTable.EditRecord then
objTable.PutImage "DO_IMAGE", filename
objTabel.PostRecord
end if
end if
end if
set objTable = nothing
Availability
Available since September 2008 (from version 3.8)