However, we decided to build one feature in that every developer could access 'out of the box'. This demonstrates the flexibility you can add to the drivers.
This is the dynamic tablenames feature. In the same way that you set a dynamic filename for your CSV file, you can dynamically set the physical name of an Oracle table.
How you set filenames / tablenames
Uniface developer may communicate with the driver at run-time using the SQL proc instruction. Any 'parameter' specified in in the help file for USYS$UD8_PARAMS may be sent to the driver, or a 'tablename' string may be sent. eg:
The 3 fields are:
This command will have NO EFFECT on tables that are already opened. So it is best to use this command BEFORE the first retrieve or store on the table, or alternatively, close the path first, eg:
How to wrap an Oracle driver
In this example we will wrap the Oracle driver from Uniface 7.2.05. The UD8/CSV driver may wrap ONE driver. The driver that is being wrapped MUST be specified in the USYS$UD8_PARAMS setting in the assignment file, eg:
USYS$UD8_PARAMS=become ORA ora8141l
The first time you 'log on' to the UD8 driver it will open in UD8/CSV mode. When you close the path and re-open it (logoff/logon), it will open in ORA mode, and all requests will be passed to the ORACLE driver, except that tablenames can be re-mapped.
The next time you close and re-open the path, the driver will then be in UD8/CSV mode, and so it will stay until given a command to 'become ORA' again.
This example we rename the logical table 'PERSON', to the physical table 'CLIENT", eg:
open "","$UD8" ; driver now open in CSV mode
; drvier opening in ORA mode
; even though we retrieve person, the table
; client is retrieved
- UD8/CSV driver is available for all Uniface supported platforms
|$Revision: 1.7 $ $Date: 2011/02/28 02:56:32 $||[go to top]|