PdcDBTable.GetFile

From External Bemet Wiki
Revision as of 09:45, 22 May 2012 by Mike (talk | contribs) (Created page with "== Declaration == GetFile(FieldName as String,FileName as String) as Boolean == Description == Gets a file from the database and stores it on disk, returns true or false whet...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

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

Description

Gets a file from the database and stores it on disk, returns true or false wheter the process is succeeded

Notes

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

Code example

This code example extracts the attachment from Calculation 00001 from the table.

Dim objTable
dim filename

Set objTable = pdc.Database.OpenTable(pdcConData, "ATTACH","AT_ORDNR")
if IsValid(objTable) then
   if objTable.Locate("AT_ORDNR", "00001") then
      filename = objTable.GetField("AT_FILE")
      objTable.GetFile("AT_BIN", filename)
   end if
end if
set objTable = nothing

Availability

Available since September 2008 (from version 3.8)