addAlias( )
Adds a User BDE Alias to a BDE session. It does NOT save the alias to the BDE config file or to the current .ini file.
Syntax
<oRef>.addAlias(<cAlias>,<cDriver>,[<cOptions>])
<oRef>
The session object in which to add the alias.
<cAlias>
Name of User BDE Alias (up to 31 characters)
<cDriver>
Name of BDE Driver for specified alias. These correspond to the driver names listed within BDE Administrator:
DBASE
PARADOX
ASCII
SQL Link Driver Names
<cOptions>
String of driver dependent options. For a DBASE alias the PATH: option is required as follows:
PATH:<Full Path to Folder>
If more than one option is needed separate options with a semi-colon.
Property of
Session
Description
The addAlias() method can be used to create temporary BDE Aliases to be used in a specific session object such as the _app.session object.
To have an alias created using addAlias() appear in the Navigator's drop down database list, it must be added using the default session object as follows:
_app.session.addAlias("someAlias","DBASE","PATH:C:\somepath")
If added via a different session, the alias will not appear in the Navigator's dropdown database list.
If the same BDE Alias is used in multiple sessions within an application you may add the same User BDE Alias to each session object or you can configure a persistant BDE Alias for use by your application (either at install time or via the BDE Administrator).
If a session object does not contain a particular BDE alias, that is referenced by a database object attached to the session, an 'Unknown Database Name' error will occur.