Difference between revisions of "CREATE BRIDGE"

From Recital Documentation Wiki
Jump to: navigation, search
Line 102: Line 102:
 
NOTE: There should be no white space either side of the '=' signs.
 
NOTE: There should be no white space either side of the '=' signs.
  
The SQL CREATE BRIDGE command can also be used to create bridge files from all Recital products.  Please see the Recital/SQL documentation for full details.
+
The [[SQL CREATE BRIDGE]] command can also be used to create bridge files from all Recital products.  Please see the Recital/SQL documentation for full details.
  
 
Bridge files are often given a '.dbf' file extension, instead of the default '.brg' to allow them to appear in table listings with standard Recital tables.
 
Bridge files are often given a '.dbf' file extension, instead of the default '.brg' to allow them to appear in table listings with standard Recital tables.

Revision as of 16:45, 19 March 2009

CREATE BRIDGE

Class

Data Connectivity


Purpose

Create a bridge definition for connection to RMS or C-ISAM data files


Syntax

CREATE BRIDGE <.brg filename> | (<expC>)

[FROM <.ini filename>]


See Also

CREATE, SQL CREATE BRIDGE


Description

The CREATE BRIDGE command is used to create a bridge file to an external file. Recital clients can access Informix compatible C-ISAM files and the following fixed length RMS File types: RMS Indexed Sequential, RMS Relative, RMS Sequential. Data access is achieved through a bridge. This requires the creation of a bridge file and an empty Recital table that has a structure matching that of the external file. The empty Recital table can be created using the SQL CREATE command or the Recital Terminal Developer CREATE Development Tool. By convention, the empty structure file is given the file extension '.str' rather than the default '.dbf'.

The CREATE BRIDGE worksurface provides a full screen facility for bridge creation in Recital Terminal Developer. The <.brg filename> can be substituted with any character expression, enclosed in round brackets, that returns a valid filename. If no file extension is specified, then .brg is used. The following elements can be defined for the bridge:


Element Description Maximum Width (Characters)
Bridge Type External data file type: CISAM, RMSIDX, RMSREL or RMSSEQ. 10
External Name Name of the external data file. 80
Database Name Name of the Recital structure table. 80
Alias The name to use to access the file. 10


For RMS files you can also specify the indexes to use.


Element Description Maximum Width (Characters)
Index keys 1-7 Indexes to use with the bridge (RMS only). 50


For RMS Indexed Sequential files specify the existing RMS index keys. For RMS Relative and Sequential file structures you can build Recital single indexes and associate them with the bridge file. In these cases, specify the full index filenames.

In other Recital products, the FROM <.ini filename> clause can be used to create the bridge file without the need to access the CREATE BRIDGE worksurface. Firstly, an 'ini' file should be created on the server in the data directory where the external data file is held. The ini file has the following contents:

[bridge]
bridgetype=<bridgetype>
externalname=<name of the external data file>
databasename=<name of the Recital structure table>
alias=<the name to use to access your file>
indexkey1=<optional RMS index key or index filename>
indexkey2=<optional RMS index key or index filename>
indexkey3=<optional RMS index key or index filename>
indexkey4=<optional RMS index key or index filename>
indexkey5=<optional RMS index key or index filename>
indexkey6=<optional RMS index key or index filename>
indexkey7=<optional RMS index key or index filename>

e.g. cisamdemo.ini

[bridge]
bridgetype=CISAM
externalname=cisam.dat
databasename=cisamstru.str
alias=cisamdemo

e.g. rmsreldemo.ini

[bridge]
bridgetype=RMSREL
externalname=rmsrel.dat
databasename=rmsreldemo.str
alias= rmsreldemo
indexkey1=ind1.ndx
indexkey2=ind2.ndx

e.g. rmsidxdemo.ini

[bridge]
bridgetype=RMSIDX
externalname=rmsidx.dat
databasename=rmsdemo.str
alias=rmsdemo
indexkey1=acc_prefix+acc_no
indexkey2=acc_prefix

NOTE: There should be no white space either side of the '=' signs.

The SQL CREATE BRIDGE command can also be used to create bridge files from all Recital products. Please see the Recital/SQL documentation for full details.

Bridge files are often given a '.dbf' file extension, instead of the default '.brg' to allow them to appear in table listings with standard Recital tables.

Bridges can also be used to call program files or view files:


Bridge Type External Name
APP Program file to run when the bridge is used
VIEW View file to open when bridge is used


Example

create bridge cisamdemo.dbf from cisamdemo


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer