KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Components Use the Host Databases Datastore
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: February 22, 2022

When developing a component that will interact with the host database's tables and records, using ORDA can make things easier. When calling the datastore from a component with the ds command, the datastore returned will be from the host database.

For example the following code, if called from a component will create an entity selection of all records from Table_1 of the host database:

$hostDBTable_1 := ds.Table_1.all()

This will allow generic components to work with many host databases or allow a component to be tailored towards a specific host database.