This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
dataStore.getInfo( )

dataStore.getInfo( ) 


 

dataStore.getInfo () -> Result 
Parameter Type   Description
Result  Object in Datastore properties

The dataStore.getInfo( ) method returns an object providing information about the datastore. This method is useful for setting up generic code.

 

Returned object

 

Property Type Description
type string
  • on ds with 4D single-user: "4D" 
  • on ds in client/server, when called on the server: "4D"
  • on ds in client/server, when called on a remote 4D: "4D Server"
  • on a remote datastore open with Open datastore: "4D Server"
networked boolean
  • True: the datastore is reached through a network connection.
  • False: the datastore is not reached through a network connection (local database)
localID text ID of the datastore on the machine. Corresponds to the localId string given with the Open datastore command. Empty string ("") for main datastore.
connection object Object describing the remote datastore connection (not returned for main datastore). Available properties:

Property Type Description
hostname text IP address or name of the remote datastore + ":" + port number
tls boolean True if secured connection is used with the remote datastore
idleTimeout number Session inactivity timeout (in minutes) 
user text User authenticated on the remote datastore
  • If the dataStore.getInfo( ) method is executed on a 4D Server or 4D single-user, networked is False. 
  • If the dataStore.getInfo( ) method is executed on a remote 4D, networked is True

 C_OBJECT($info)
 
 $info:=ds.getInfo() //Executed on 4D Server or 4D
  //{"type":"4D","networked":false,"localID":""}
 
 $info:=ds.getInfo() // Executed on 4D remote
  //{"type":"4D Server","networked":true,"localID":""}

On a remote datastore:

 C_OBJECT($info;$connectTo;$remoteDS)
 
 $connectTo:=New object("hostname";"111.222.33.44:8044";"user";"marie";"password";"aaaa")
 $remoteDS:=Open datastore($connectTo;"students")
 $info:=$remoteDS.getInfo()
 
  //{"type":"4D Server",
  //"localID":"students",
  //"networked":true,
  //"connection":{hostname:"111.222.33.44:8044","tls":false,"idleTimeout":2880,"user":"marie"}}



See also 

dataClass.getInfo( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - DataStore

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R5
Modified: 4D v18

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)