PdcDatabase.OpenExternalTable

From External Bemet Wiki
Jump to navigation Jump to search

Declaration

OpenExternalTable(DBPath as String,UserName as String,Password as String,TablePath as String,IndexName as String,ClientServer as Boolean,Exclusive as Boolean) as PdcDBTable

Description

Open a table outside the data dictionary

Notes

This method opens a table that is not added to the data dictionary or opens a table in another data dictionary. The input parameters are:

  • Databasepath as string, can be an empty string.
  • Username as string, can be an empty string. Do not use the user 'ADSSYS'. Always use the user 'PDC'.
  • Password as string, can be an empty string.
  • Tablepath as string, this paramater is mandatory, aways use the table extention .ADT.
  • Indexname as string
  • ClientServer as boolean
  • Exclusive as boolean

Code example

dim objTable
dim tablepath
dim hoogte

   tablepath = pdc.Options.GetFilePath(pdcApplicationPath) & "\Scripter\Settings"
   set objTable = pdc.Database.OpenExternalTable("","","",tablepath & "\Settings.ADT","SET_ID",False,False)
   if IsValid(objTable) then
      if objTable.Locate("SET_ID","HOOGTE") then
      	 hoogte = objTable.GetField("VALUE")
      end if
   end if

Availability

Available since June 2008 (from version 3.8)