Operating System BFS
Although previous versions of OpenInsight provided a rudimentary facility to treat Windows directories as multivalue files, OpenInsight 10 has formalized this process by providing an Operating System DataSource type (OSD). Using the OSD Basic Filing System (BFS), developers and end-users can access Windows files as OpenInsight records; each defined Windows directory is treated as an OpenInsight table.
To create an OSD BFS record, in the OI 10 IDE go to File/New/Entity, and choose "Database Components." Then select Operating System Directory DataSource, and click OK:
When defining an OSD BFS connection, you must specify the type of connection (Translated or Raw), the location of the Windows directory, and optionally the location where you would like the OpenInsight dictionary table to be created:
Most Windows text files should be accessed in translated mode; this will convert CR/LF sequences to field marks, better "mapping" the data to OpenInsight records. If, however, your data does not contain cr/lf delimited strings, is non-text, or is binary in nature, then choose "Raw Mode" instead.
You can browse for the folder you wish to map by clicking on the "â€¦" button. Note that, in almost all cases, you should specify a UNC path to the folder â€“ that way, it's available throughout your OpenInsight network installation. Using a local drive and folder, or a mapped folder name, will only be appropriate when communicating directly with Windows folders on your local PC, and that will not be accessed by any other workstation, or via CTO, O4W, and AREV64.
If you would like a dictionary table to be created for this OSD BFS connection, you must specify the location where that table should be created. You can explicitly type in a location, or click the browse button ("â€¦") to select the location.
Once you've specified the connection type, the Windows folder, and (optionally) the dictionary location, you must indicate whether you want the OSD BFS connection to just be saved but not actually attached; attached to your current instance of OpenInsight only; or attached to your current instance of OpenInsight and defined into the database template (DBT) so that it is "attached" whenever this application is opened. In most cases, attaching and defining in the DBT is the appropriate option.
Press the SAVE button, and you will be prompted for the name to use for this connection; after entering a connection name, the connection will be saved. Note that if you enter the name of another currently-attached table, an error will be displayed and you will need to choose a different, unused, name for your connection.
At this point, you can access the Windows directory as you would an OI table. For example, if you have a Windows directory with the following contents:
We can define an OSD BFS connection that accesses that folder:
When we hit the SAVE button, we'll be prompted to enter the name of this connection â€“ the name we specify for the connection will be how we refer to this Windows folder while inside OpenInsight. For example, let's name this connection C_TEMP:
We can now access the "table" C_TEMP through any OI process â€“ for example, we can list the items:
And we can edit the records in the record editor:
Basic+ stored procedures, as well, can also access these "tables" as though they were normal OpenInsight tables, with SELECT/READ/WRITE/DELETE/etc. commands.
To modify or delete an existing OSD BFS connection, from the OI 10 IDE select File/Open/Entity, choose DataSources as the Entity Type, and choose Operating System Directory DataSource BFS Connections from the Entity Class drop-down:
Then choose the connection name you wish to edit and click OK:
You can modify the connection type and location, change how or if to attach the datasource, and save your changes; or you can choose File/Delete from the menu to delete the current OSD BFS connection.