PdcDBTable.GetImage: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == GetImage(FieldName as String,FileName as String) as Boolean == Description == Gets an image from the database and stores this on disk, returns true or false..."
 
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"
       objTable.GetImage("DO_IMAGE", filename)
       objTable.GetImage "DO_IMAGE", filename
   end if
   end if
end if
end if

Latest revision as of 05:54, 4 October 2013

Declaration

GetImage(FieldName as String,FileName as String) as Boolean

Description

Gets an image from the database and stores this on disk, returns true or false wether the process has succeeded

Notes

This method will store the image in the database on disk in the given filename.

Code example

This code example will store the image of calculation 00001 on disk in the given filename.

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"
      objTable.GetImage "DO_IMAGE", filename
   end if
end if
set objTable = nothing

Availability

Available since September 2008 (from version 3.8)