PdcDatabase.OpenExternalTable: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 6: Line 6:


== Notes ==
== Notes ==
This method opens a table that is not added to the datadictonary.  
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: <br />
The input parameters are: <br />
* Databasepath as string, can be an empty string.
* Databasepath as string, can be an empty string.
Line 22: Line 22:
dim tablepath
dim tablepath
dim hoogte
dim hoogte
   tablepath = pdc.Options.GetFilePath(pdcApplicationPath) & "\Scripter\Settings"
   tablepath = pdc.Options.GetFilePath(pdcApplicationPath) & "\Scripter\Settings"
   set objTable = pdc.Database.OpenExternalTable("","","",tablepath & "\Settings.ADT","SET_ID",False,False)
   set objTable = pdc.Database.OpenExternalTable("","","",tablepath & "\Settings.ADT","SET_ID",False,False)

Latest revision as of 13:24, 10 February 2014

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)